From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: RFC: [PATCH] staging/lustre/llite: fix O_TMPFILE/O_LOV_DELAY_CREATE conflict Date: Mon, 10 Feb 2014 22:10:30 +0000 Message-ID: <20140210221030.GG18016@ZenIV.linux.org.uk> References: <20140210212929.GF18016@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , "linux-fsdevel@vger.kernel.org" , "Drokin, Oleg" , Peng Tao , "greg@kroah.com" To: "Dilger, Andreas" Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:37200 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752277AbaBJWKq (ORCPT ); Mon, 10 Feb 2014 17:10:46 -0500 Content-Disposition: inline In-Reply-To: <20140210212929.GF18016@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Feb 10, 2014 at 09:29:29PM +0000, Al Viro wrote: > On Mon, Feb 10, 2014 at 08:16:52PM +0000, Dilger, Andreas wrote: > > > >>Instead of trying to find a non-conflicting O_LOV_DELAY_CREATE flag > > >>or define a Lustre-specific flag that isn't of use to most/any other > > >>filesystems, use (O_NOCTTY|FASYNC) as the new value. These flag > > >>are not meaningful for newly-created regular files and should be > > >>OK since O_LOV_DELAY_CREATE is only meaningful for new files. > > *shrug* > > I can live with that; it's a kludge, but it's less broken than that > explicit constant - that one is a non-starter, since O_... flag > values are arch-dependent. > > I have another question about what you are doing there - the games > you are playing with crw_pos. Is there any reason not to have ->ki_pos > updated immediately in lustre_generic_file_read()/lustre_generic_file_write()? > > These two are the only places in the entire tree where > generic_file_aio_{read,write}() does *not* have ppos argument > equal to &iocb->ki_pos and I would very much prefer to kill the > sucker off. Ugh... Sorry, I misread that code. Why the devil do you have the pos argument passed to lustre_generic_file_{read,write}() by address, when both proceed to dereference it and pass the value on?