Joe Jin wrote:I tested Andrew's patch and panic was gone but got few ENOTBLK. So I tried with Joe's patch , both panic and ENOTBLK are gone now. But in Joe's patch if (ret == -ENOTBLK && (rw & WRITE)), dio_cleanup(dio) was not getting called because of break. So I moved dio_cleanup just after if (ret). I tested with this patch, both panic and ENOTBLK are gone now. Here is the modified patch: --- linux-2.6.22/fs/direct-io.c.orig 2007-07-27 03:06:39.000000000 -0700 +++ linux-2.6.22/fs/direct-io.c 2007-07-27 03:24:55.000000000 -0700 @@ -1033,17 +1033,18 @@ if (ret) { dio_cleanup(dio); - break; + if (ret == -ENOTBLK && (rw & WRITE)) { + /* + * The remaining part of the request will be + * be handled by buffered I/O when we return + */ + ret = 0; + break; + } + goto out; } } /* end iovec loop */ - if (ret == -ENOTBLK && (rw & WRITE)) { - /* - * The remaining part of the request will be - * be handled by buffered I/O when we return - */ - ret = 0; - } /* * There may be some unwritten disk at the end of a part-written * fs-block-sized block. Go zero that now. @@ -1112,7 +1113,7 @@ kfree(dio); } else BUG_ON(ret != -EIOCBQUEUED); - +out: return ret; } -
| Chuck Ebbert | Why do so many machines need "noapic"? |
| Jesper Juhl | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Joe Perches | Re: [RFC] New kernel-message logging API |
| Ken Chen | [patch] remove artificial software max_loop limit |
git: | |
| walt | [VOTE] git versus mercurial |
| Linus Torvalds | People unaware of the importance of "git gc"? |
| Junio C Hamano | Re: git + ssh + key authentication feature-request |
| Martin Langhoff | Handling large files with GIT |
| Christian Weisgerber | Re: libiconv problem |
| Richard Stallman | Real men don't attack straw men |
| Daniel Ouellet | Show your appreciation and get your 4.2 DVD |
| new_guy | Code signing in OpenBSD |
| David C. Niemi | Re: rsh: "rcmd: socket: Permission denied" |
| Peter MacDonald | demand paging: proposal |
| Peter Grehan | TCP SYN_RECV state: stuck forever in accept() ? |
| Dennis Robinson | Source for uptime, df, ps ? |
