mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Erez Zadok <ezk@cs.sunysb.edu>
To: Hugh Dickins <hugh@veritas.com>
Cc: Erez Zadok <ezk@cs.sunysb.edu>, linux-kernel@vger.kernel.org
Subject: Re: unionfs: several more problems
Date: Mon, 26 Nov 2007 23:17:36 -0500	[thread overview]
Message-ID: <200711270417.lAR4HaTi012203@agora.fsl.cs.sunysb.edu> (raw)
In-Reply-To: Your message of "Mon, 26 Nov 2007 20:14:46 GMT." <Pine.LNX.4.64.0711261953220.2958@blonde.wat.veritas.com>

In message <Pine.LNX.4.64.0711261953220.2958@blonde.wat.veritas.com>, Hugh Dickins writes:
> On Mon, 26 Nov 2007, Erez Zadok wrote:
[...]
> > The small patch below fixed the problem.  Let me know what you think.
> 
> I've one issue with it: please move that wait_on_page_writeback before
> the clear_page_dirty_for_io instead of after it, then resubmit your 14/16.
[...]

Done, tested, and working.  Here's the revised patch (pushed to unionfs.git
on korg).

Thanks,
Erez.

------------------------------------------------------------------------------

Unionfs: prevent multiple writers to lower_page

Without this patch, the LTP fs test "rwtest04" triggers a
BUG_ON(PageWriteback(page)) in fs/buffer.c:1706.

CC: Hugh Dickins <hugh@veritas.com>

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
diff --git a/fs/unionfs/mmap.c b/fs/unionfs/mmap.c
index 623a913..74f2e53 100644
--- a/fs/unionfs/mmap.c
+++ b/fs/unionfs/mmap.c
@@ -72,6 +72,7 @@ static int unionfs_writepage(struct page *page, struct writeback_control *wbc)
 	}
 
 	BUG_ON(!lower_mapping->a_ops->writepage);
+	wait_on_page_writeback(lower_page); /* prevent multiple writers */
 	clear_page_dirty_for_io(lower_page); /* emulate VFS behavior */
 	err = lower_mapping->a_ops->writepage(lower_page, wbc);
 	if (err < 0)

      reply	other threads:[~2007-11-27  4:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-20 19:14 Hugh Dickins
2007-11-23 21:20 ` Erez Zadok
2007-11-26 16:53 ` Erez Zadok
2007-11-26 20:14   ` Hugh Dickins
2007-11-27  4:17     ` Erez Zadok [this message]

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=200711270417.lAR4HaTi012203@agora.fsl.cs.sunysb.edu \
    --to=ezk@cs.sunysb.edu \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®