[linux-cifs-client] Re: [PATCH 4/4] cifs: flush data on any setattr

Steve French smfrench at gmail.com
Fri Mar 27 02:52:51 GMT 2009


On Thu, Mar 26, 2009 at 12:35 PM, Jeff Layton <jlayton at redhat.com> wrote:
> We already flush all the dirty pages for an inode before doing
> ATTR_SIZE and ATTR_MTIME changes. There's another problem though -- if
> we change the mode so that the file becomes read-only then we may not
> be able to write data to it after a reconnect.
>
> Fix this by just going back to flushing all the dirty data on any
> setattr call.
> +        * BB: This should be smarter. Why bother flushing pages that
> +        * will be truncated anyway? Also, should we error out here if
> +        * the flush returns error?
> +        */

Merged the patch into cifs-2.6.git, but Jeff brings up an interesting
point about what really happens when we are shrinking the file size
(truncate) here ... is it possible that the vfs will flush pages that
are going to be thrown away



-- 
Thanks,

Steve


More information about the linux-cifs-client mailing list