Goldwyn Rodrigues
2009-Jul-11 15:57 UTC
[Ocfs2-devel] Initialize count in aio_write before generic_write_checks
generic_write_checks() expects count to be initialized to the size of the write. Writes to files open with O_DIRECT|O_LARGEFILE write 0 bytes because count in uninitialized. Signed-off-by: Goldwyn Rodrigues <rgoldwyn at suse.de> diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index a5887df..5b9c8af 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -1841,6 +1841,7 @@ relock: if (ret) goto out_dio; + count = ocount; ret = generic_write_checks(file, ppos, &count, S_ISBLK(inode->i_mode)); if (ret) -- Goldwyn
Sunil Mushran
2009-Jul-13 18:01 UTC
[Ocfs2-devel] Initialize count in aio_write before generic_write_checks
Goldwyn Rodrigues wrote:> generic_write_checks() expects count to be initialized to the size of > the write. > Writes to files open with O_DIRECT|O_LARGEFILE write 0 bytes because > count in uninitialized. > > Signed-off-by: Goldwyn Rodrigues <rgoldwyn at suse.de> >Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>> diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c > index a5887df..5b9c8af 100644 > --- a/fs/ocfs2/file.c > +++ b/fs/ocfs2/file.c > @@ -1841,6 +1841,7 @@ relock: > if (ret) > goto out_dio; > > + count = ocount; > ret = generic_write_checks(file, ppos, &count, > S_ISBLK(inode->i_mode)); > if (ret) > >
Joel Becker
2009-Jul-21 00:27 UTC
[Ocfs2-devel] Initialize count in aio_write before generic_write_checks
On Sat, Jul 11, 2009 at 10:57:27AM -0500, Goldwyn Rodrigues wrote:> generic_write_checks() expects count to be initialized to the size of > the write. > Writes to files open with O_DIRECT|O_LARGEFILE write 0 bytes because > count in uninitialized. > > Signed-off-by: Goldwyn Rodrigues <rgoldwyn at suse.de>This is now in the fixes branch of ocfs2.git Joel -- Life's Little Instruction Book #237 "Seek out the good in people." Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
Apparently Analagous Threads
- [PATCH] ocfs2: avoid direct write if we fall back to buffered v2
- [PATCH] Remove unecessary ERROR when removing non-empty directory
- [PATCH] Remove redundant BUG_ON in __dlm_queue_ast
- [PATCH V8 21/33] ocfs2: add support for read_iter and write_iter
- [PATCH V5 19/30] ocfs2: add support for read_iter, write_iter, and direct_IO_bvec