All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suparna Bhattacharya <suparna@in.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: cmm@us.ibm.com, pbadari@us.ibm.com,
	linux-fsdevel@vger.kernel.org, sct@redhat.com, andrea@suse.de
Subject: Re: kjournald() with DIO
Date: Thu, 15 Sep 2005 16:41:10 +0530	[thread overview]
Message-ID: <20050915111110.GA6904@in.ibm.com> (raw)
In-Reply-To: <20050914150224.3b6d7051.akpm@osdl.org>

On Wed, Sep 14, 2005 at 03:02:24PM -0700, Andrew Morton wrote:
> Mingming Cao <cmm@us.ibm.com> wrote:
> >
> > I proposed similar idea to Andrea in the bug report before.  Andrea
> > expressed this concern: with this(try_to_free_buffers() still fail to
> > drop the buffer because of this elevated-refcount by kjournald),
> > block_read_full_page will not re-read from disk the buffers the next
> > time a buffered-IO read from disk, after the direct-io has completed.
> > This is because the buffer is marked uptodate. How could we handle this?
> 
> Well.  Application A has written data x with direct-io.  Application B has,
> at a later time, written, dirtied (or even read) data y with buffered I/O.

I guess the concern is the the page that B has written was based off stale
data, which has been mmap written with a few new bytes.

But I wonder, do we really have to or intend to guarantee DIO vs mmaped
write consistency ? What we have is sort of best effort -- we just ensure
no corruptions and exposures, and try to keep data consistent to the
extent we can. Can we actually do a perfect job ?

> 
> So the contents of pagecache are in fact correct, but it is not known
> whether or not the data on disk is correct.
> 
> I guess one way of resolving it is to make invalidate_inode_pages2_range()
> provide a hard guarantee: call truncate_complete_page() instead of
> invalidate_complete_page().  We need to have a think about the implications
> of that.  For starters, if someone gets in at the right time and
> reinstantiates a pte against the page, we'll end up converting that into an
> anonymous page.


Regards
Suparna

> -
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Suparna Bhattacharya (suparna@in.ibm.com)
Linux Technology Center
IBM Software Lab, India


  reply	other threads:[~2005-09-15 11:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-12 23:23 kjournald() with DIO Badari Pulavarty
2005-09-12 23:37 ` Andrew Morton
2005-09-13  0:06   ` Badari Pulavarty
2005-09-13  0:29     ` Andrew Morton
2005-09-13 16:52       ` Badari Pulavarty
2005-09-13 23:07         ` Andrew Morton
2005-09-14 17:23           ` Mingming Cao
2005-09-14 18:18             ` Andrew Morton
2005-09-14 21:40               ` Mingming Cao
2005-09-14 22:02                 ` Andrew Morton
2005-09-15 11:11                   ` Suparna Bhattacharya [this message]
2005-09-15 18:52                     ` Andrew Morton
2005-09-15 15:03                   ` Badari Pulavarty
2005-09-15 19:22                     ` Andrea Arcangeli
2005-09-15 20:00                       ` Andrew Morton
2005-09-15 20:20                         ` Andrea Arcangeli
2005-09-15 20:35                           ` Andrew Morton
2005-09-15 20:49                             ` Badari Pulavarty
2005-09-15 21:06                               ` Andrea Arcangeli
2005-09-15 21:20                               ` Andrew Morton
2005-09-15 22:22                                 ` Badari Pulavarty
2005-09-15 21:03                             ` Andrea Arcangeli
2005-09-15 21:26                               ` Andrew Morton
2005-09-15 22:04                                 ` Andrea Arcangeli
2005-09-15 23:28                                   ` Mingming Cao
2005-09-16  0:18                                     ` Andrea Arcangeli
2005-09-13 17:53       ` Mingming Cao
2005-09-16 13:42       ` Stephen C. Tweedie
2005-09-21 18:22         ` Mingming Cao

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=20050915111110.GA6904@in.ibm.com \
    --to=suparna@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=andrea@suse.de \
    --cc=cmm@us.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=pbadari@us.ibm.com \
    --cc=sct@redhat.com \
    /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.