Re: [PATCH 3/8] swap: don't add ITER_BVEC flag to direct_IO rw

2014-12-15 Thread Omar Sandoval
On Mon, Dec 15, 2014 at 06:16:02AM +, Al Viro wrote: > On Sun, Dec 14, 2014 at 09:26:57PM -0800, Omar Sandoval wrote: > > The rw argument to direct_IO has some ill-defined semantics. Some > > filesystems (e.g., ext4, FAT) decide whether they're doing a write with > > rw == WRITE, but others (e.

Re: [PATCH 3/8] swap: don't add ITER_BVEC flag to direct_IO rw

2014-12-14 Thread Al Viro
On Sun, Dec 14, 2014 at 09:26:57PM -0800, Omar Sandoval wrote: > The rw argument to direct_IO has some ill-defined semantics. Some > filesystems (e.g., ext4, FAT) decide whether they're doing a write with > rw == WRITE, but others (e.g., XFS) check rw & WRITE. Let's set a good > example in the swap

[PATCH 3/8] swap: don't add ITER_BVEC flag to direct_IO rw

2014-12-14 Thread Omar Sandoval
The rw argument to direct_IO has some ill-defined semantics. Some filesystems (e.g., ext4, FAT) decide whether they're doing a write with rw == WRITE, but others (e.g., XFS) check rw & WRITE. Let's set a good example in the swap file code and say ITER_BVEC belongs in iov_iter->flags but not in rw.