Prev: linux-next: build failure after merge of the xfs tree
Next: [PATCH 0/4] memcg reclaim tracepoint v2
From: Stephen Rothwell on 25 Jul 2010 22:00 Hi Al, [These became irrelevant when I reverted the xfs tree for a build error, but will be done when the xfs tree is fixed.] Today's linux-next merge of the vfs tree got a conflict in fs/xfs/linux-2.6/xfs_aops.c between commit 7346e1197eb76e22199b6b4625f129331e0fd7ac ("xfs simplify and speed up direct I/O completions") from the xfs tree and commit b682ce06449c35a85dc5e63fcaab7dba2ba6df9b ("sort out blockdev_direct_IO variants") from the vfs tree. Also between commit 6f6b39eb706f5617750cf02952e4e6d7470c40bf ("xfs: use GFP_NOFS for page cache allocation") from the xfs tree and commit 4478b21470275454f9eb6f590dfe7cc54d643978 ("get rid of block_write_begin_newtrunc") from the vfs tree. I fixed them up (I think - see below) and can carry the fix as necessary. -- Cheers, Stephen Rothwell sfr(a)canb.auug.org.au diff --cc fs/xfs/linux-2.6/xfs_aops.c index d24e78f,77a9ecc..0000000 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@@ -1471,26 -1655,22 +1471,26 @@@ xfs_vm_direct_IO loff_t offset, unsigned long nr_segs) { - struct file *file = iocb->ki_filp; - struct inode *inode = file->f_mapping->host; - struct block_device *bdev; - ssize_t ret; - - bdev = xfs_find_bdev_for_inode(inode); - - iocb->private = xfs_alloc_ioend(inode, rw == WRITE ? - IO_UNWRITTEN : IO_READ); - - ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, - nr_segs, xfs_get_blocks_direct, - xfs_end_io_direct, NULL, 0); + struct inode *inode = iocb->ki_filp->f_mapping->host; + struct block_device *bdev = xfs_find_bdev_for_inode(inode); + ssize_t ret; + + if (rw & WRITE) { + iocb->private = xfs_alloc_ioend(inode, IO_NEW); + - ret = blockdev_direct_IO_no_locking(rw, iocb, inode, bdev, iov, - offset, nr_segs, - xfs_get_blocks_direct, - xfs_end_io_direct_write); ++ ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iov, ++ offset, nr_segs, ++ xfs_get_blocks_direct, ++ xfs_end_io_direct_write, NULL, 0); + if (ret != -EIOCBQUEUED && iocb->private) + xfs_destroy_ioend(iocb->private); + } else { - ret = blockdev_direct_IO_no_locking(rw, iocb, inode, bdev, iov, - offset, nr_segs, - xfs_get_blocks_direct, - NULL); ++ ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iov, ++ offset, nr_segs, ++ xfs_get_blocks_direct, ++ NULL, NULL, 0); + } - if (unlikely(ret != -EIOCBQUEUED && iocb->private)) - xfs_destroy_ioend(iocb->private); return ret; } @@@ -1504,9 -1700,31 +1520,31 @@@ xfs_vm_write_begin struct page **pagep, void **fsdata) { - *pagep = NULL; - return block_write_begin(file, mapping, pos, len, flags | AOP_FLAG_NOFS, - pagep, fsdata, xfs_get_blocks); + int ret; + - ret = block_write_begin(mapping, pos, len, flags, pagep, ++ ret = block_write_begin(mapping, pos, len, flags | AOP_FLAG_NOFS, pagep, + xfs_get_blocks); + if (unlikely(ret)) + xfs_vm_write_failed(mapping, pos + len); + return ret; + } + + STATIC int + xfs_vm_write_end( + struct file *file, + struct address_space *mapping, + loff_t pos, + unsigned len, + unsigned copied, + struct page *page, + void *fsdata) + { + int ret; + + ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata); + if (unlikely(ret < len)) + xfs_vm_write_failed(mapping, pos + len); + return ret; } STATIC sector_t -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Dave Chinner on 26 Jul 2010 00:10 On Mon, Jul 26, 2010 at 11:51:16AM +1000, Stephen Rothwell wrote: > Hi Al, > > [These became irrelevant when I reverted the xfs tree for a build error, > but will be done when the xfs tree is fixed.] > > Today's linux-next merge of the vfs tree got a conflict in > fs/xfs/linux-2.6/xfs_aops.c between commit > 7346e1197eb76e22199b6b4625f129331e0fd7ac ("xfs simplify and speed up > direct I/O completions") from the xfs tree and commit > b682ce06449c35a85dc5e63fcaab7dba2ba6df9b ("sort out blockdev_direct_IO > variants") from the vfs tree. > > Also between commit 6f6b39eb706f5617750cf02952e4e6d7470c40bf ("xfs: use > GFP_NOFS for page cache allocation") from the xfs tree and commit > 4478b21470275454f9eb6f590dfe7cc54d643978 ("get rid of > block_write_begin_newtrunc") from the vfs tree. > > I fixed them up (I think - see below) and can carry the fix as necessary. The fix looks OK. Thanks Stephen. Cheers, Dave. -- Dave Chinner david(a)fromorbit.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Stephen Rothwell on 26 Jul 2010 00:10 Hi Dave, On Mon, 26 Jul 2010 13:59:50 +1000 Dave Chinner <david(a)fromorbit.com> wrote: > > The fix looks OK. Thanks Stephen. Thanks for the confirmation. -- Cheers, Stephen Rothwell sfr(a)canb.auug.org.au http://www.canb.auug.org.au/~sfr/
From: Stephen Rothwell on 3 Aug 2010 22:00 Hi Al, On Mon, 5 Jul 2010 10:02:48 +1000 Stephen Rothwell <sfr(a)canb.auug.org.au> wrote: > > Today's linux-next merge of the vfs tree got a conflict in > fs/xfs/linux-2.6/xfs_super.c between commit > 04d2da9c682ce2687db29136c60d8679e37e3b35 ("xfs: split xfs_itrace_entry") > from the xfs tree and commit b43cb885cc49c782dd0734292d3cd95631200e5c > ("convert remaining ->clear_inode() to ->evict_inode()") from the vfs > tree. > > Just context changes. I fixed it up (see below) and can carry the fix as > necessary. I guess that the tracing code needs updating for the > xfs_fs_clear_inode -> xfs_fs_evict_inode name change as well. And I am > wondering if the tracing wants to go ahead of the truncate_inode_pages() > call? > > In anticipation, I have added this merge fix patch as well: Linus has now merged the xfs tree, so this patch can be applied to the vfs tree (assuming it is ok). From: Stephen Rothwell <sfr(a)canb.auug.org.au> Date: Mon, 5 Jul 2010 09:43:42 +1000 Subject: [PATCH] xfs: update tracing for clear_inode to evict_inode transition Signed-off-by: Stephen Rothwell <sfr(a)canb.auug.org.au> --- fs/xfs/linux-2.6/xfs_super.c | 4 ++-- fs/xfs/linux-2.6/xfs_trace.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 157aaed..3e5052c 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c @@ -1107,10 +1107,10 @@ xfs_fs_evict_inode( { xfs_inode_t *ip = XFS_I(inode); + trace_xfs_evict_inode(ip); + truncate_inode_pages(&inode->i_data, 0); end_writeback(inode); - trace_xfs_clear_inode(ip); - XFS_STATS_INC(vn_rele); XFS_STATS_INC(vn_remove); XFS_STATS_DEC(vn_active); diff --git a/fs/xfs/linux-2.6/xfs_trace.h b/fs/xfs/linux-2.6/xfs_trace.h index d506753..76de133 100644 --- a/fs/xfs/linux-2.6/xfs_trace.h +++ b/fs/xfs/linux-2.6/xfs_trace.h @@ -576,7 +576,7 @@ DEFINE_INODE_EVENT(xfs_ioctl_setattr); DEFINE_INODE_EVENT(xfs_file_fsync); DEFINE_INODE_EVENT(xfs_destroy_inode); DEFINE_INODE_EVENT(xfs_write_inode); -DEFINE_INODE_EVENT(xfs_clear_inode); +DEFINE_INODE_EVENT(xfs_evict_inode); DEFINE_INODE_EVENT(xfs_dquot_dqalloc); DEFINE_INODE_EVENT(xfs_dquot_dqdetach); -- 1.7.1 -- Cheers, Stephen Rothwell sfr(a)canb.auug.org.au http://www.canb.auug.org.au/~sfr/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|
Pages: 1 Prev: linux-next: build failure after merge of the xfs tree Next: [PATCH 0/4] memcg reclaim tracepoint v2 |