Skip to contentSkip to conversation

cifs: flush data on any setattr

PATCH New Steve French 1 participant 1 message Mar 27, 2009 3 messages not in the archive VFS

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

PATCH 4/4 cifs: flush data on any setattr

---------- Forwarded message ----------
From: Steve French <[email protected]>
Date: Thu, Mar 26, 2009 at 9:52 PM
Subject: Re: [PATCH 4/4] cifs: flush data on any setattr
To: Jeff Layton <[email protected]>
Cc: [email protected]

Quoted 11 lines · Jeff Layton

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

Signature · 7 lines
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html