From: Andrea Arcangeli <andrea@suse.de>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>,
Alexander Viro <viro@math.psu.edu>
Subject: Re: linux-2.4.10-pre5
Date: Sun, 9 Sep 2001 16:47:38 +0200 [thread overview]
Message-ID: <20010909164738.T11329@athlon.random> (raw)
In-Reply-To: <20010909061620.O11329@athlon.random> <Pine.LNX.4.33.0109082115270.1161-100000@penguin.transmeta.com>
In-Reply-To: <Pine.LNX.4.33.0109082115270.1161-100000@penguin.transmeta.com>; from torvalds@transmeta.com on Sat, Sep 08, 2001 at 09:28:43PM -0700
On Sat, Sep 08, 2001 at 09:28:43PM -0700, Linus Torvalds wrote:
>
> On Sun, 9 Sep 2001, Andrea Arcangeli wrote:
>
> > On Sat, Sep 08, 2001 at 08:58:26PM -0700, Linus Torvalds wrote:
> > > I'd rather fix that, then.
> >
> > we'd just need to define a new kind of communication API between a ro
> > mounted fs and the blkdev layer to avoid the special cases.
>
> No, notice how the simple code _should_ work for ro-mounted filesystems
> as-is. AND it should work for read-only opens of disks with rw-mounted
correct.
> filesystems. The only case it doesn't like is the "rw-open of a device
> that is rw-mounted".
it also doesn't work for ro-open of a device that is rw-mounted, hdparm
-t as said a million of times now.
> It's only filesystems that have modified buffers without marking them
> dirty (by virtue of having pointers to buffers and delaying the dirtying
> until later) that are broken by the "try to make sure all buffers are
> up-to-date by reading them in" approach.
All filesystems marks the buffers dirty after modifying them. The
problem is that they don't always lock_buffer(); modify ; mark_dirty();
unlock_buffer(), so we cannot safely do the update-I/O from disk to
buffer cache on the pinned buffers or we risk to screwup the
filesystem while it's in the "modify; mark_dirty()" part.
> And as I don't think the concurrent "rw-open + rw-mount" case makes any
> sense, I think the sane solution is simply to disallow it completely.
I don't disallow it, I just don't guarantee coherency after that, the fs
could be screwedup if you rw-open + rw-mount and that's ok.
the case where it is not ok is hdparm: ro-open + rw-mounted.
> So if we simply disallow that case, then we do not have any problem:
> either the device was opened read-only (in which case it obviously doesn't
> need to flush anything to disk, or invalidate/revalidate existing disk
Then you are making a special case "the device was opened read-only in
which case it obviously doesn't need to flush anything to disk" means
you are not running the update_buffers() if the open was O_RDONLY (if
you make this special case you would be safe on that side). But also
the user may do O_RDWR open and not modify the device, and still we must
not screwup a rw-mountd fs under it.
as far I can tell my synchronization code is the simpler possible and
it's completly safe, without changing the synchronization API with the
pinned buffers, or without making getblk to be backed on the blkdev
pagecache enterely that has larger impact on the kernel.
Making getblk to be blkdev pagecache backed seems the cleaner way to get
rid of those aliasing issues to be allowed to just limit the very latest
close to a __block_fsync + truncate_inode_pages() [which is a 5 lines
cleanup compared to my current state of the patch], with it not even the
last blkdev release will run the block_fsync since the fs still holds a
reference on the same side, the fs will be just another blkdev user like
if it came from userspace. However this logic is potentially more
invasive than the blkdev-pagecache code that matters and it doesn't
provide a single advantage to the user, so this isn't in my top list at
the moment, sounds 2.5 cleanup material.
Andrea
next prev parent reply other threads:[~2001-09-09 14:47 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-08 4:18 linux-2.4.10-pre5 Linus Torvalds
2001-09-08 6:32 ` linux-2.4.10-pre5: drivers/net/wan compile fixes Eyal Lebedinsky
2001-09-08 6:36 ` 2.4.9-ac10 (not 2.4.10-pre5!) wan fixes Eyal Lebedinsky
2001-09-08 8:32 ` 2.4.10-pre5 compile error George Bonser
2001-09-08 17:19 ` linux-2.4.10-pre5 Andrea Arcangeli
2001-09-08 17:30 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-08 17:57 ` linux-2.4.10-pre5 Andrea Arcangeli
2001-09-08 18:01 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-09 1:09 ` linux-2.4.10-pre5 Andrea Arcangeli
2001-09-09 1:20 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-09 1:38 ` linux-2.4.10-pre5 Andrea Arcangeli
2001-09-09 1:53 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-09 2:22 ` linux-2.4.10-pre5 Andrea Arcangeli
2001-09-09 2:31 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-09 3:30 ` linux-2.4.10-pre5 Andrea Arcangeli
2001-09-09 3:58 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-09 4:16 ` linux-2.4.10-pre5 Andrea Arcangeli
2001-09-09 4:28 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-09 12:09 ` linux-2.4.10-pre5 Rik van Riel
2001-09-09 14:53 ` linux-2.4.10-pre5 Andrea Arcangeli
2001-09-09 18:17 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-09 20:18 ` linux-2.4.10-pre5 H. Peter Anvin
2001-09-10 0:39 ` linux-2.4.10-pre5 Simon Kirby
2001-09-10 8:30 ` linux-2.4.10-pre5 Kai Henningsen
2001-09-11 5:29 ` linux-2.4.10-pre5 Peter Samuelson
2001-09-11 11:29 ` linux-2.4.10-pre5 Kai Henningsen
2001-09-10 21:22 ` linux-2.4.10-pre5 Stephen C. Tweedie
2001-09-09 14:47 ` Andrea Arcangeli [this message]
2001-09-09 16:24 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-09 17:29 ` linux-2.4.10-pre5 Andrea Arcangeli
2001-09-09 23:56 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-09 4:29 ` linux-2.4.10-pre5 Andreas Dilger
2001-09-09 4:54 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-09 6:17 ` linux-2.4.10-pre5 Andreas Dilger
2001-09-09 17:31 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-09 19:19 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-09 23:24 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-09 23:54 ` linux-2.4.10-pre5 Alan Cox
2001-09-10 0:04 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-10 0:23 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-10 0:23 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-10 0:38 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-10 1:04 ` linux-2.4.10-pre5 Andrea Arcangeli
2001-09-10 1:45 ` linux-2.4.10-pre5 Chris Mason
2001-09-10 1:55 ` linux-2.4.10-pre5 Andrea Arcangeli
2001-09-10 2:02 ` linux-2.4.10-pre5 Chris Mason
2001-09-10 2:06 ` linux-2.4.10-pre5 Andrea Arcangeli
2001-09-10 2:15 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-10 2:22 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-10 2:20 ` linux-2.4.10-pre5 Chris Mason
2001-09-10 2:40 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-10 3:02 ` linux-2.4.10-pre5 Chris Mason
2001-09-10 3:36 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-10 19:06 ` linux-2.4.10-pre5 Chris Mason
2001-09-10 2:03 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-10 2:41 ` linux-2.4.10-pre5 Chris Mason
2001-09-10 21:18 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-10 21:23 ` linux-2.4.10-pre5 Alex Bligh - linux-kernel
2001-09-10 21:54 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-10 22:39 ` linux-2.4.10-pre5 Alex Bligh - linux-kernel
2001-09-10 23:13 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-10 23:25 ` linux-2.4.10-pre5 Alex Bligh - linux-kernel
2001-09-10 22:15 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-10 22:26 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-10 22:39 ` linux-2.4.10-pre5 Rik van Riel
2001-09-10 23:14 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-10 23:16 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-11 0:53 ` linux-2.4.10-pre5 Rik van Riel
2001-09-11 6:39 ` linux-2.4.10-pre5 Hua Zhong
2001-09-11 15:12 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-11 15:44 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-11 15:48 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-11 16:05 ` linux-2.4.10-pre5 Alex Bligh - linux-kernel
2001-09-11 16:07 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-11 16:07 ` linux-2.4.10-pre5 Alex Bligh - linux-kernel
2001-09-11 16:13 ` linux-2.4.10-pre5 Martin Dalecki
2001-09-11 17:17 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-11 10:02 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-11 20:07 ` linux-2.4.10-pre5 Rik van Riel
2001-09-10 23:20 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-11 0:20 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-11 1:16 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-11 2:27 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-11 7:45 ` linux-2.4.10-pre5 Helge Hafting
2001-09-11 10:27 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-11 15:39 ` linux-2.4.10-pre5 Linus Torvalds
2001-09-11 16:52 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-09 19:51 ` linux-2.4.10-pre5 Daniel Phillips
2001-09-09 9:05 ` linux-2.4.10-pre5 Christoph Hellwig
2001-09-09 13:14 ` linux-2.4.10-pre5 Anton Altaparmakov
2001-09-09 14:31 ` linux-2.4.10-pre5 Andrea Arcangeli
2001-09-08 21:15 ` linux-2.4.10-pre5 Andreas Dilger
2001-09-09 0:59 ` linux-2.4.10-pre5 Andrea Arcangeli
2001-09-08 22:01 ` linux-2.4.10-pre5 Thiago Vinhas de Moraes
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=20010909164738.T11329@athlon.random \
--to=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/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