From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 13/15] Do not fallback to default_llseek() when readdir() uses BKL Date: Fri, 20 Nov 2009 22:27:32 +0100 Message-ID: <20091120212732.GD15631@duck.suse.cz> References: <1258735245-25826-1-git-send-email-jblunck@suse.de> <1258735245-25826-14-git-send-email-jblunck@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, Christoph Hellwig , Alan Cox , Linux-Kernel Mailinglist , Andrew Morton , Thomas Gleixner , jkacur@redhat.com, Arnd Bergmann , =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker , Jamie Lokier , "H. Peter Anvin" , Petr Vandrovec , Anders Larsen , Jan Kara To: Jan Blunck Return-path: Received: from cantor.suse.de ([195.135.220.2]:55909 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754515AbZKTV1a (ORCPT ); Fri, 20 Nov 2009 16:27:30 -0500 Content-Disposition: inline In-Reply-To: <1258735245-25826-14-git-send-email-jblunck@suse.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri 20-11-09 17:40:43, Jan Blunck wrote: > Do not use the fallback default_llseek() if the readdir operation of the > filesystem still uses the big kernel lock. Since llseek() modifies > file->f_pos of the directory directly it may need locking to not confuse > readdir which usually uses file->f_pos directly as well. Since the special > characteristics of the BKL (unlocked on schedule) are not necessary in this > case, the inode mutex can be used for locking as provided by > generic_file_llseek(). This is only possible since all filesystems, except > reiserfs, either use a directory as a flat file or with disk address > offsets. Reiserfs on the other hand uses a 32bit hash off the filename as > the offset so generic_file_llseek() can get used as well since the hash is > always smaller than sb->s_maxbytes (= (512 << 32) - blocksize). > > Signed-off-by: Jan Blunck > --- > fs/udf/dir.c | 1 + For the UDF part: Acked-by: Jan Kara -- Jan Kara SUSE Labs, CR