* [PATCH] NFS: return -EAGAIN when skipped commit in nfs_commit_unstable_pages()
@ 2011-06-10 14:04 Wu Fengguang
2011-06-13 19:38 ` Trond Myklebust
0 siblings, 1 reply; 3+ messages in thread
From: Wu Fengguang @ 2011-06-10 14:04 UTC (permalink / raw)
To: Trond Myklebust; +Cc: Christoph Hellwig, linux-nfs, linux-fsdevel, LKML
It's confusing to return success while redirtying the inode at the
same time in ->write_inode(). Return -EAGAIN to indicate that we've
not finished with this inode.
Impact: it's a cleanup, not bug fix.
CC: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
fs/nfs/write.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next.orig/fs/nfs/write.c 2011-06-10 21:52:34.000000000 +0800
+++ linux-next/fs/nfs/write.c 2011-06-10 21:52:37.000000000 +0800
@@ -1521,7 +1521,7 @@ static int nfs_commit_unstable_pages(str
{
struct nfs_inode *nfsi = NFS_I(inode);
int flags = FLUSH_SYNC;
- int ret = 0;
+ int ret = -EAGAIN;
if (wbc->sync_mode == WB_SYNC_NONE) {
/* Don't commit yet if this is a non-blocking flush and there
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] NFS: return -EAGAIN when skipped commit in nfs_commit_unstable_pages()
2011-06-10 14:04 [PATCH] NFS: return -EAGAIN when skipped commit in nfs_commit_unstable_pages() Wu Fengguang
@ 2011-06-13 19:38 ` Trond Myklebust
[not found] ` <1307993886.5569.3.camel-SyLVLa/KEI9HwK5hSS5vWB2eb7JE58TQ@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2011-06-13 19:38 UTC (permalink / raw)
To: Wu Fengguang; +Cc: Christoph Hellwig, linux-nfs, linux-fsdevel, LKML
On Fri, 2011-06-10 at 22:04 +0800, Wu Fengguang wrote:
> It's confusing to return success while redirtying the inode at the
> same time in ->write_inode(). Return -EAGAIN to indicate that we've
> not finished with this inode.
>
> Impact: it's a cleanup, not bug fix.
>
> CC: Christoph Hellwig <hch@infradead.org>
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
> ---
> fs/nfs/write.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next.orig/fs/nfs/write.c 2011-06-10 21:52:34.000000000 +0800
> +++ linux-next/fs/nfs/write.c 2011-06-10 21:52:37.000000000 +0800
> @@ -1521,7 +1521,7 @@ static int nfs_commit_unstable_pages(str
> {
> struct nfs_inode *nfsi = NFS_I(inode);
> int flags = FLUSH_SYNC;
> - int ret = 0;
> + int ret = -EAGAIN;
>
> if (wbc->sync_mode == WB_SYNC_NONE) {
> /* Don't commit yet if this is a non-blocking flush and there
Looks good, but since this is a cleanup, I'm queueing it for 3.1 rather
than pushing it in the regression-fixing window.
Cheers
Trond
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-14 2:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-10 14:04 [PATCH] NFS: return -EAGAIN when skipped commit in nfs_commit_unstable_pages() Wu Fengguang
2011-06-13 19:38 ` Trond Myklebust
[not found] ` <1307993886.5569.3.camel-SyLVLa/KEI9HwK5hSS5vWB2eb7JE58TQ@public.gmane.org>
2011-06-14 2:30 ` Wu Fengguang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).