linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: jens.axboe@oracle.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	akpm@linux-foundation.org, hugh@veritas.com,
	nickpiggin@yahoo.com.au
Subject: Re: [patch 1/2] mm: dont clear PG_uptodate in invalidate_complete_page2()
Date: Wed, 25 Jun 2008 08:11:07 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0806250757150.4733@hp.linux-foundation.org> (raw)
In-Reply-To: <20080625124121.839734708@szeredi.hu>



On Wed, 25 Jun 2008, Miklos Szeredi wrote:
> 
> Clearing the uptodate page flag will cause page_cache_pipe_buf_confirm()
> to return -ENODATA if that page was in the buffer.  This in turn will cause
> splice() to return a short or zero count.

I really think we should just change splice itself at this point.

The VM people may end up removing the clearing of the uptodate bit for 
other reasons, but there's no way I'll do this kind of thing which affects 
unknown number of cases for just the splice kind of reason, when we could 
just change the one place you care about right now - which is just
FUSE/NFSD/page_cache_pipe_buf_confirm.

I also really don't think this even fixes the problems you have with 
FUSE/NFSD - because you'll still be reading zeroes for a truncated file. 
Yes, you get the rigth counts, but you don't get the right data.

(And no, your previous patch that removed the asnchronous stuff and the 
pipe_buf_confirm entirely didn't fix it _either_ - it's simply unavoidable 
when you just pass unlocked pages around. There is no serialization with 
other people doing truncates etc)

That's "correct" from a splice() kind of standpoint (it's essentially a 
temporary mmap() with MAP_PRIVATE), but the thing is, it just sounds like 
the whole "page went away" thing is a more fundamental issue. It sounds 
like nfds should hold a read-lock on the file while it has any IO in 
flight, or something like that.

IOW, I don't think your patch really is in the right area. I *do* agree 
that page_cache_pipe_buf_confirm() itself probably is worth changing, but 
I think you're trying to treat some of the individual symptoms here (and 
not even all), and there's a more fundamental underlying issue that you're 
not loooking at.

Maybe.

		Linus

  parent reply	other threads:[~2008-06-25 15:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-25 12:40 [patch 0/2] splice: fix nfs export of fuse filesystems Miklos Szeredi
2008-06-25 12:40 ` [patch 1/2] mm: dont clear PG_uptodate in invalidate_complete_page2() Miklos Szeredi
2008-06-25 13:11   ` Evgeniy Polyakov
2008-06-25 13:32     ` Miklos Szeredi
2008-06-25 14:16       ` Evgeniy Polyakov
2008-06-25 14:41         ` Miklos Szeredi
2008-06-25 15:30           ` Evgeniy Polyakov
2008-06-25 15:59             ` Miklos Szeredi
2008-06-25 16:18               ` Evgeniy Polyakov
2008-06-25 15:47           ` Evgeniy Polyakov
2008-06-25 16:02             ` Miklos Szeredi
2008-06-25 16:19               ` Evgeniy Polyakov
2008-06-25 15:11   ` Linus Torvalds [this message]
2008-06-25 15:29     ` Miklos Szeredi
2008-06-25 16:30       ` Linus Torvalds
2008-06-25 16:42         ` Miklos Szeredi
2008-06-25 17:38     ` Jamie Lokier
2008-06-25 18:35       ` Miklos Szeredi
2008-07-07  6:38         ` Nick Piggin
2008-07-07  9:21           ` Miklos Szeredi
2008-07-07 10:12             ` Miklos Szeredi
2008-07-07 11:01               ` Nick Piggin
2008-07-07 12:03                 ` Miklos Szeredi
2008-07-07 12:17                   ` Nick Piggin
2008-07-07 12:52                     ` Miklos Szeredi
2008-07-07 14:28                       ` Nick Piggin
2008-07-07 15:08                         ` Miklos Szeredi
2008-07-08  2:22                           ` Nick Piggin
2008-07-07 10:43             ` Nick Piggin
2008-06-25 12:40 ` [patch 2/2] splice: fix generic_file_splice_read() race with page invalidation Miklos Szeredi
2008-06-25 13:00   ` Jens Axboe

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=alpine.LFD.1.10.0806250757150.4733@hp.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=hugh@veritas.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=miklos@szeredi.hu \
    --cc=nickpiggin@yahoo.com.au \
    /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).