Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)

From: Andrew Morton
Date: Tue Oct 26 2004 - 17:17:56 EST


jfannin1@xxxxxxxxxxxxxxx wrote:
>
> > [To check for repeat of old problems with related symptoms:]
> > Were both kernels compiled with the same compiler version? Which version?
> > Does it make any difference if you rebuild lvm with --disable-o_direct?
>
> Chris Han (BCC'ed) mailed me to let me know he'd narrowed the
> problem down to the 'dio-handle-eof.patch'. Reverting it makes things
> work for me too. Yay!

If you have time, please restore dio-handle-eof.patch and then apply the
below fixup, then retest. Thanks.

--- 25/fs/direct-io.c~dio-handle-eof-fix 2004-10-26 00:49:40.363376432 -0700
+++ 25-akpm/fs/direct-io.c 2004-10-26 00:49:40.367375824 -0700
@@ -987,6 +987,8 @@ direct_io_worker(int rw, struct kiocb *i
isize = i_size_read(inode);
if (bytes_todo > (isize - offset))
bytes_todo = isize - offset;
+ if (!bytes_todo)
+ return 0;

for (seg = 0; seg < nr_segs && bytes_todo; seg++) {
user_addr = (unsigned long)iov[seg].iov_base;
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/