Re: [Ocfs2-devel] [RFC PATCH 0/5] Remove rw parameter from direct_IO()

2015-03-18 Thread Al Viro
On Mon, Mar 16, 2015 at 04:33:48AM -0700, Omar Sandoval wrote: Hi, Al, here's some cleanup that you mentioned back in December that I got around to (https://lkml.org/lkml/2014/12/15/28). In summary, the rw parameter to a_ops-direct_IO() is redundant with .type in struct iov_iter.

Re: [Ocfs2-devel] [RFC PATCH 1/5] new helper: iov_iter_rw()

2015-03-18 Thread Omar Sandoval
On Tue, Mar 17, 2015 at 10:31:51AM +0100, David Sterba wrote: On Mon, Mar 16, 2015 at 05:36:05PM +, Al Viro wrote: On Mon, Mar 16, 2015 at 04:33:49AM -0700, Omar Sandoval wrote: Get either READ or WRITE out of iter-type. Umm... + * Get one of READ or WRITE out of iter-type

Re: [Ocfs2-devel] [RFC PATCH 1/5] new helper: iov_iter_rw()

2015-03-18 Thread Al Viro
On Mon, Mar 16, 2015 at 04:33:49AM -0700, Omar Sandoval wrote: Get either READ or WRITE out of iter-type. Umm... + * Get one of READ or WRITE out of iter-type without any other flags OR'd in + * with it. + */ +static inline int iov_iter_rw(const struct iov_iter *i) +{ + return

[Ocfs2-devel] [RFC PATCH 5/5] direct_IO: remove rw from a_ops-direct_IO()

2015-03-18 Thread Omar Sandoval
Now that no one is using rw, remove it completely. Signed-off-by: Omar Sandoval osan...@osandov.com --- Documentation/filesystems/Locking | 2 +- Documentation/filesystems/vfs.txt | 2 +- drivers/staging/lustre/lustre/llite/rw26.c | 4 ++-- fs/9p/vfs_addr.c

Re: [Ocfs2-devel] [RFC PATCH 1/5] new helper: iov_iter_rw()

2015-03-18 Thread Al Viro
On Tue, Mar 17, 2015 at 10:31:51AM +0100, David Sterba wrote: Agreed, but the proposed define is rather cryptic and I was not able to understand the meaning on the first glance. #define iov_iter_rw(i) ((0 ? (struct iov_iter *)0 : (i))-type RW_MASK) This worked for me, does not compile

[Ocfs2-devel] [RFC PATCH 1/5] new helper: iov_iter_rw()

2015-03-18 Thread Omar Sandoval
Get either READ or WRITE out of iter-type. Signed-off-by: Omar Sandoval osan...@osandov.com --- include/linux/uio.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/uio.h b/include/linux/uio.h index 7188029..87a47b3 100644 --- a/include/linux/uio.h +++

[Ocfs2-devel] [RFC PATCH 4/5] direct_IO: use iov_iter_rw() instead of rw everywhere

2015-03-18 Thread Omar Sandoval
The rw parameter to direct_IO is redundant with iov_iter-type, and treated slightly differently just about everywhere it's used: some users do rw WRITE, and others do rw == WRITE where they should be doing a bitwise check. Simplify this with the new iov_iter_rw() helper, which always returns

[Ocfs2-devel] [RFC PATCH 0/5] Remove rw parameter from direct_IO()

2015-03-18 Thread Omar Sandoval
Hi, Al, here's some cleanup that you mentioned back in December that I got around to (https://lkml.org/lkml/2014/12/15/28). In summary, the rw parameter to a_ops-direct_IO() is redundant with .type in struct iov_iter. Additionally, rw is inconsistently checked for being a WRITE; some filesystems

Re: [Ocfs2-devel] [Ocfs2-users] size increase

2015-03-18 Thread Umarzuki Mochlis
Hi, What I meant by total size is output of 'du -hs' I can see output of fdisk on mpath1 of ocfs2 LUN similar to logical volume of ext4 partition (255 head 63 sectors) It is a 2 nodes ocfs cluster. 2015-03-18 10:50 GMT+08:00 Xue jiufei xuejiu...@huawei.com: Hi Umarzuki, What is the meaning

[Ocfs2-devel] [RFC PATCH 3/5] Remove rw from dax_{do_,}io()

2015-03-18 Thread Omar Sandoval
And use iov_iter_rw() instead. Signed-off-by: Omar Sandoval osan...@osandov.com --- fs/dax.c | 27 +-- fs/ext2/inode.c| 4 ++-- fs/ext4/indirect.c | 4 ++-- fs/ext4/inode.c| 2 +- include/linux/fs.h | 4 ++-- 5 files changed, 20 insertions(+), 21

Re: [Ocfs2-devel] [Ocfs2-users] size increase

2015-03-18 Thread Umarzuki Mochlis
1) yes even 36K text html file in ext4 became 128K inside ocfs2 2) I installed ocfs-tools on Ubuntu 14.04 amd64 A LUN added to a newly created LVM group, so no other physical volume added other than this one and formatted as ocfs2 with below command sudo mkfs.ocfs2 -b 4K -C 128K -L Web Cluster

Re: [Ocfs2-devel] [RFC PATCH 1/5] new helper: iov_iter_rw()

2015-03-18 Thread David Sterba
On Mon, Mar 16, 2015 at 05:36:05PM +, Al Viro wrote: On Mon, Mar 16, 2015 at 04:33:49AM -0700, Omar Sandoval wrote: Get either READ or WRITE out of iter-type. Umm... + * Get one of READ or WRITE out of iter-type without any other flags OR'd in + * with it. + */ +static