All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Jan Kara <jack@suse.cz>
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Buffer state bits
Date: Wed, 26 Aug 2009 22:27:00 +0100	[thread overview]
Message-ID: <20090826212700.GB691@shareable.org> (raw)
In-Reply-To: <20090826200021.GA5716@duck.novell.com>

Jan Kara wrote:
> BH_Dirty
> - Ideally, this bit should mean "buffer has data that have to be
>   written". But it is not quite true. The problem happens when
>   someone calls set_page_dirty() on the page to which buffers are
>   attached or similarly when buffers are attached to a dirty
>   page. Then all buffers attached to the page are marked dirty -
>   even those that are beyond end of file which obviously should not
>   be written.
> 
>   When buffer is dirty, the page has to be dirty as well (mark
>   buffer dirty takes care of that). It is not necessarily the other
>   way around and buffer dirty bit is what ultimately decides whether
>   the buffer goes to disk or not.

That last sentence implies page can be dirty while a buffer in the
page is not dirty.

In that case, do buffers beyond the end of file need to be set dirty
by set_page_dirty()?  If yes, perhaps the text could explain why.

-- Jamie

  reply	other threads:[~2009-08-26 21:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-26 20:00 Buffer state bits Jan Kara
2009-08-26 21:27 ` Jamie Lokier [this message]
2009-08-27 11:14   ` Jan Kara
2009-08-27 12:33 ` Aneesh Kumar K.V
2009-08-27 14:32   ` Jan Kara

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=20090826212700.GB691@shareable.org \
    --to=jamie@shareable.org \
    --cc=akpm@linux-foundation.org \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.