From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: Re: [patch 3/5] vfs: introduce FMODE_NEG_OFFSET for allowing negative f_pos Date: Wed, 21 Jul 2010 11:10:14 +0800 Message-ID: <20100721031014.GB9012@localhost> References: <201007202229.o6KMTmMF021834@imap1.linux-foundation.org> <20100721025437.GC2963@amd> <20100721115359.01b5d2b8.kamezawa.hiroyu@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Nick Piggin , "akpm@linux-foundation.org" , "viro@zeniv.linux.org.uk" , "linux-fsdevel@vger.kernel.org" , "heiko.carstens@de.ibm.com" To: KAMEZAWA Hiroyuki Return-path: Received: from mga11.intel.com ([192.55.52.93]:47363 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762060Ab0GUDKT (ORCPT ); Tue, 20 Jul 2010 23:10:19 -0400 Content-Disposition: inline In-Reply-To: <20100721115359.01b5d2b8.kamezawa.hiroyu@jp.fujitsu.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Jul 21, 2010 at 10:53:59AM +0800, KAMEZAWA Hiroyuki wrote: > On Wed, 21 Jul 2010 12:54:37 +1000 > Nick Piggin wrote: > > > On Tue, Jul 20, 2010 at 03:29:48PM -0700, Andrew Morton wrote: > > > From: KAMEZAWA Hiroyuki > > > > > > Now, rw_verify_area() checsk f_pos is negative or not. And if negative, > > > returns -EINVAL. > > > > > > But, some special files as /dev/(k)mem and /proc//mem etc.. has > > > negative offsets. And we can't do any access via read/write to the > > > file(device). > > > > > > So introduce FMODE_NEG_OFFSET to allow negative file offsets. > > > > Minor nitpick but I don't understand why this is called NEG_OFFSET. It's > > a large positive offset into the file so FMODE_UNSIGNED_OFFSET seems > > like it would be better. > > > Ah, agreed. Agreed too. > I'll prepare a macro-renaming patch later (if this patch goes now.) > Thank you for review. Thanks, Fengguang