From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve French Subject: Fwd: [PATCH 4/4] cifs: flush data on any setattr Date: Thu, 26 Mar 2009 21:53:04 -0500 Message-ID: <524f69650903261953u64744ed3i5280f137b02295@mail.gmail.com> References: <1238088937-10994-1-git-send-email-jlayton@redhat.com> <1238088937-10994-5-git-send-email-jlayton@redhat.com> <524f69650903261952o6dd8497bnc8b10ae0a41721d4@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE To: linux-fsdevel Return-path: Received: from qw-out-2122.google.com ([74.125.92.26]:51688 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750875AbZC0CxG convert rfc822-to-8bit (ORCPT ); Thu, 26 Mar 2009 22:53:06 -0400 Received: by qw-out-2122.google.com with SMTP id 8so1019133qwh.37 for ; Thu, 26 Mar 2009 19:53:04 -0700 (PDT) In-Reply-To: <524f69650903261952o6dd8497bnc8b10ae0a41721d4@mail.gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: ---------- Forwarded message ---------- =46rom: Steve French Date: Thu, Mar 26, 2009 at 9:52 PM Subject: Re: [PATCH 4/4] cifs: flush data on any setattr To: Jeff Layton Cc: linux-cifs-client@lists.samba.org On Thu, Mar 26, 2009 at 12:35 PM, Jeff Layton wrot= e: > We already flush all the dirty pages for an inode before doing > ATTR_SIZE and ATTR_MTIME changes. There's another problem though -- i= f > 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. > + =A0 =A0 =A0 =A0* BB: This should be smarter. Why bother flushing pa= ges that > + =A0 =A0 =A0 =A0* will be truncated anyway? Also, should we error ou= t here if > + =A0 =A0 =A0 =A0* the flush returns error? > + =A0 =A0 =A0 =A0*/ 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 --=20 Thanks, Steve -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html