[no subject]

2006-12-21 Thread chris . mason
From [EMAIL PROTECTED] Thu Dec 21 15:34:59 2006 Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [PATCH 2 of 8] Change O_DIRECT to use placeholders instead of i_mutex/i_alloc_sem locking X-Mercurial-Node:

Re: Finding hardlinks

2006-12-21 Thread Jan Harkes
On Wed, Dec 20, 2006 at 12:44:42PM +0100, Miklos Szeredi wrote: The stat64.st_ino field is 64bit, so AFAICS you'd only need to extend the kstat.ino field to 64bit and fix those filesystems to fill in kstat correctly. Coda actually uses 128-bit file identifiers internally, so 64-bits really

Re: Finding hardlinks

2006-12-21 Thread Mikulas Patocka
On Thu, 21 Dec 2006, Jan Harkes wrote: On Wed, Dec 20, 2006 at 12:44:42PM +0100, Miklos Szeredi wrote: The stat64.st_ino field is 64bit, so AFAICS you'd only need to extend the kstat.ino field to 64bit and fix those filesystems to fill in kstat correctly. Coda actually uses 128-bit file

[PATCH 0 of 8] O_DIRECT locking rework v5

2006-12-21 Thread Chris Mason
[ resend, sorry for the messed up headers ] I took a small detour on the O_DIRECT locking rework to look at different alternatives for range locking in the pagecache. After benchmarking a few different types of trees, I didn't find anything that would match radix for random lookup performance.

[PATCH 2 of 8] Change O_DIRECT to use placeholders instead of i_mutex/i_alloc_sem locking

2006-12-21 Thread Chris Mason
All mutex and semaphore usage is removed from the blockdev_direct_IO paths. Filesystems can either do this locking on their own, or ask for placeholder pages. Signed-off-by: Chris Mason [EMAIL PROTECTED] diff -r 4cac7e560b53 -r 317779b11fe1 fs/direct-io.c --- a/fs/direct-io.cThu Dec 21

[PATCH 3 of 8] DIO: don't fall back to buffered writes

2006-12-21 Thread Chris Mason
Placeholder pages allow DIO to use locking rules similar to that of writepage. DIO can now fill holes, and it can extend the file via get_block(). i_mutex can be dropped during writes if we are writing inside i_size. Signed-off-by: Chris Mason [EMAIL PROTECTED] diff -r 317779b11fe1 -r

[PATCH 4 of 8] Add flags to control direct IO helpers

2006-12-21 Thread Chris Mason
This creates a number of flags so that filesystems can control blockdev_direct_IO. It is based on code from Russell Cettelan. The new flags are: DIO_CREATE -- always pass create=1 to get_block on writes. This allows DIO to fill holes in the file. DIO_PLACEHOLDERS -- use

[PATCH 5 of 8] Make ext3 safe for the new DIO locking rules

2006-12-21 Thread Chris Mason
This creates a version of ext3_get_block that starts and ends a transaction. By starting and ending the transaction inside get_block, this is able to avoid lock inversion problems when the DIO code tries to take page locks inside blockdev_direct_IO. (transaction locks must always happen after

[PATCH 6 of 8] Make reiserfs safe for new DIO locking rules

2006-12-21 Thread Chris Mason
reiserfs is changed to use a version of reiserfs_get_block that is safe for filling holes without i_mutex held. Signed-off-by: Chris Mason [EMAIL PROTECTED] diff -r bebaf8972a31 -r 5a06df98f46d fs/reiserfs/inode.c --- a/fs/reiserfs/inode.c Thu Dec 21 15:31:30 2006 -0500 +++

[PATCH 7 of 8] Adapt XFS to the new blockdev_direct_IO calls

2006-12-21 Thread Chris Mason
XFS is changed to use blockdev_direct_IO flags instead of DIO_OWN_LOCKING. Signed-off-by: Chris Mason [EMAIL PROTECTED] diff -r 5a06df98f46d -r 3bd838f3dc06 fs/xfs/linux-2.6/xfs_aops.c --- a/fs/xfs/linux-2.6/xfs_aops.c Thu Dec 21 15:31:31 2006 -0500 +++ b/fs/xfs/linux-2.6/xfs_aops.c

[PATCH 8 of 8] Avoid too many boundary buffers in DIO

2006-12-21 Thread Chris Mason
Dave Chinner found a 10% performance regression with ext3 when using DIO to fill holes instead of buffered IO. On large IOs, the ext3 get_block routine will send more than a page worth of blocks back to DIO via a single buffer_head with a large b_size value. The DIO code iterates through this