From mboxrd@z Thu Jan 1 00:00:00 1970 From: Trond Myklebust Subject: Re: [PATCH 09/12] NFS: Replace __nfs_write_mapping with sync_inode() Date: Tue, 26 Jan 2010 09:02:52 -0500 Message-ID: <1264514573.3615.90.camel@localhost> References: <20100125221544.16750.70574.stgit@localhost.localdomain> <20100125221545.16750.63968.stgit@localhost.localdomain> <20100126112148.GA25170@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Cc: linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Wu Fengguang , Peter Zijlstra , Jan Kara , Steve Rago , Jens Axboe , Peter Staubach , Arjan van de Ven , Ingo Molnar , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Christoph Hellwig , Al Viro To: Christoph Hellwig Return-path: In-Reply-To: <20100126112148.GA25170-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org On Tue, 2010-01-26 at 06:21 -0500, Christoph Hellwig wrote: > On Mon, Jan 25, 2010 at 05:15:45PM -0500, Trond Myklebust wrote: > > int nfs_wb_nocommit(struct inode *inode) > > { > > - return nfs_write_mapping(inode->i_mapping, FLUSH_NOCOMMIT); > > + return filemap_write_and_wait(inode->i_mapping); > > Any point in keeping this as a wrapper for a single well-documented > caller? Also taking i_mutex around it seems a bit questionable these > days given that filemap_write_and_wait avoids lifelocks with writing > applications okay and we use it without i_mutex all over the place. > Agreed, but just out of curiosity. Is there any reason why we shouldn't use filemap_flush() + filemap_fdatawait() here instead? We're not really interested in doing a full data integrity flush, but just want to make sure that pages which were dirtied before the stat() syscall are flushed to disk so that the server updates the c/mtime for us. Cheers Trond -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html