linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peng Tao <lkml.bergwolf@gmail.com>
To: linux-nfs@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Question about nfs_page_async_flush assertion
Date: Thu, 18 Nov 2010 18:53:54 +0800	[thread overview]
Message-ID: <AANLkTimavN8px1k_Y65mFqsAsiLjgCh6vos22ZnZm+3Z@mail.gmail.com> (raw)

Hi, all,

nfs_writepages calls into
write_cache_pages()->nfs_writepages_callback()->nfs_do_writepage()->nfs_page_async_flush(),
where it asserts BUG_ON(test_bit(PG_CLEAN, &req->wb_flags)).
My question is: how do we guarantee the request has PG_CLEAN flag set?

nfs_writepages calls:
 356         nfs_pageio_init_write(&pgio, inode, wb_priority(wbc));
 357         err = write_cache_pages(mapping, wbc,
nfs_writepages_callback, &pgio);
 358         nfs_pageio_complete(&pgio);

IIUC, the request will only be issued in nfs_pageio_complete() and
there nfs_write_rpcsetup() will call
nfs_writeback_release_full()->nfs_mark_request_commit() to set the
PG_CLEAN flag. If the request has not ever been issued before entering
nfs_writepages, the PG_CLEAN flag will not be set and the BUG_ON will
be triggered. Am I missing something?

-- 
Thanks,
-Bergwolf

             reply	other threads:[~2010-11-18 10:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 10:53 Peng Tao [this message]
2010-11-18 15:27 ` Question about nfs_page_async_flush assertion Trond Myklebust
2010-11-18 17:22   ` Peng Tao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimavN8px1k_Y65mFqsAsiLjgCh6vos22ZnZm+3Z@mail.gmail.com \
    --to=lkml.bergwolf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).