linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: "Bityutskiy Artem (Nokia-D/Helsinki)"
	<Artem.Bityutskiy@nokia.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"hirofumi@mail.parknet.co.jp" <hirofumi@mail.parknet.co.jp>,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Hunter Adrian (Nokia-D/Helsinki)" <adrian.hunter@nokia.com>
Subject: Re: [PATCH 0/4] FS: userspace notification of errors
Date: Tue, 9 Jun 2009 15:49:22 +0200	[thread overview]
Message-ID: <20090609134921.GB13755@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <ac3eb2510906050606u7527654dv789364549b36f3e7@mail.gmail.com>

> On Fri, Jun 5, 2009 at 13:51, Denis Karpov<ext-denis.2.karpov@nokia.com> wrote:
> > This is doable, e.g. in the form of optional fields "tag[:value]"
> > (field 7, Documentation/filesystems/proc.txti for mountinfo).
> 
> > But is using procfs generally a good idea ? Last several years all a lot of
> > stuff moved out from procfs into sysfs. Not to forget what procfs is
> > originally meant for: storing the proceses related information.
> 
> Yeah, but mounted volumes are namespace dependent, and namespaces are
> process dependent. So events for your current namespace wouldn't be
> too bad here. There might be reasons we don't want the mountinfo file,
> but the "use sysfs for new stuff" does not count in this case. :)
  As much as I don't like the using /proc/mountinfo for this, it also
has the advantage that it nicely solves the problem with a filesystem
being bind-mounted on several directories...  Otherwise you have to
solve the problem which mountpoint of the filesystem should be used
(especially because the real root of the filesystem need not be
accessible from the namespace of the process).

> > - /sys/fs seems to be a perfect fit for the purpose judging by ext4 example
> > cons:
> > - uevent interface is unneeded extra(?); can be made optional, per attribute
> 
> You can not pass the mount path with the uevent, like you example
> shows, you just don't know that reliably, and there can be many mount
> points.
> 
> How do you want to name the /sys/fs/ device? By "dev_t st_dev" or the
> underlying block device name? How do you indentify the mountpoint in
> your current namespace, of the device that raised the error? The event
> might be for a filesystem you can not reach at all in your mount tree.
> 
> The /sys/fs/ approach sounds very much like an "export known
> superblocks in /sys/fs/", something like this could be useful, but we
> need to check carefully with other people what are the issues of such
> an interface, and if there is something that should not be exported
> that way.
> 
> How are device-less superblocks like btrfs handled in such an
> interface, how is the device named, if it does not have a direct block
> device underneath?
  Generally, it is an unclear question how should kernel identify a
filesystem where the problem happened. We could have a kobject for
superblock but it's still unclear how to map this to a device /
mountpoints because that's what userspace ultimately wants to tell the
sysadmin and possibly make some automated decision.
  What currently seems as the cleanest solution to me, is to add some
"filesystem identifier" field to /proc/self/mountinfo (which could be
UUID, superblock pointer or whatever) and pass this along with the error
message to userspace. Passing could be done either via sysfs (but I
agree it isn't the best fit because a filesystem need not be bound to a
device) or just via generic netlink (which has the disadvantage that you
cannot use the udev framework everyone knows)...

									Honza
-- 
Jan Kara <jack@suse.cz>
SuSE CR Labs

  parent reply	other threads:[~2009-06-09 13:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03 15:05 [PATCH 0/4] FS: userspace notification of errors Denis Karpov
2009-06-03 15:05 ` [PATCH 1/4] FS: filesystem corruption notification Denis Karpov
2009-06-03 15:05   ` [PATCH 2/4] FAT: generalize errors and warning printing Denis Karpov
2009-06-03 15:05     ` [PATCH 3/4] FAT: add 'notify' mount option Denis Karpov
2009-06-03 15:05       ` [PATCH 4/4] EXT2: " Denis Karpov
2009-06-03 19:00         ` Andrew Morton
2009-06-10 21:03         ` Pavel Machek
2009-06-03 18:59       ` [PATCH 3/4] FAT: " Andrew Morton
2009-06-03 18:58   ` [PATCH 1/4] FS: filesystem corruption notification Andrew Morton
2009-06-03 15:36 ` [PATCH 0/4] FS: userspace notification of errors Eric Sandeen
2009-06-03 18:56 ` Andrew Morton
2009-06-04  1:59   ` Jamie Lokier
2009-06-04  5:57   ` Artem Bityutskiy
2009-06-04 14:27     ` Denis Karpov
2009-06-10 21:05     ` Pavel Machek
2009-06-04 12:53   ` Kay Sievers
2009-06-04 14:29     ` Russell Cattelan
2009-06-05  7:25     ` Jon Masters
2009-06-05 11:07     ` Artem Bityutskiy
2009-06-05 11:51       ` Denis Karpov
2009-06-05 13:06         ` Kay Sievers
     [not found]         ` <ac3eb2510906050606u7527654dv789364549b36f3e7@mail.gmail.com>
2009-06-09 13:49           ` Jan Kara [this message]
2009-06-03 22:30 ` Jan Kara
2009-06-04  6:10   ` Artem Bityutskiy

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=20090609134921.GB13755@atrey.karlin.mff.cuni.cz \
    --to=jack@suse.cz \
    --cc=Artem.Bityutskiy@nokia.com \
    --cc=adrian.hunter@nokia.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).