Re: [Ocfs2-devel] [PATCH 4/7 v4] ocfs2: add and remove inode in orphan dir in ocfs2_direct_IO

2014-10-22 Thread Joseph Qi
This patch has some issues: 1) cannot use ocfs2_clusters_for_bytes to calculate v_cpos, we need the floor, not roof; 2) the return value (bytes written) of blockdev_direct_IO will be override, which is not right. On 2014/10/11 20:29, WeiWei Wang wrote: Add the inode to orphan dir first, and then

Re: [Ocfs2-devel] [PATCH 4/7 v4] ocfs2: add and remove inode in orphan dir in ocfs2_direct_IO

2014-10-15 Thread Andrew Morton
On Sat, 11 Oct 2014 20:29:08 +0800 WeiWei Wang wangww...@huawei.com wrote: Add the inode to orphan dir first, and then delete it once append O_DIRECT finished. This is to make sure block allocation and inode size are consistent. ... +static ssize_t ocfs2_direct_IO_write(struct kiocb

Re: [Ocfs2-devel] [PATCH 4/7 v4] ocfs2: add and remove inode in orphan dir in ocfs2_direct_IO

2014-10-15 Thread Andrew Morton
On Wed, 15 Oct 2014 16:42:44 -0700 Andrew Morton a...@linux-foundation.org wrote: On Sat, 11 Oct 2014 20:29:08 +0800 WeiWei Wang wangww...@huawei.com wrote: Add the inode to orphan dir first, and then delete it once append O_DIRECT finished. This is to make sure block allocation and

[Ocfs2-devel] [PATCH 4/7 v4] ocfs2: add and remove inode in orphan dir in ocfs2_direct_IO

2014-10-11 Thread WeiWei Wang
Add the inode to orphan dir first, and then delete it once append O_DIRECT finished. This is to make sure block allocation and inode size are consistent. Signed-off-by: Weiwei Wang wangww...@huawei.com Reviewed-by: Joseph Qi joseph...@huawei.com --- fs/ocfs2/aops.c | 178