[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110113133722.GG30719@htj.dyndns.org>
Date: Thu, 13 Jan 2011 14:37:22 +0100
From: Tejun Heo <tj@...nel.org>
To: Karel Zak <kzak@...hat.com>
Cc: Milan Broz <mbroz@...hat.com>,
device-mapper development <dm-devel@...hat.com>,
Jun'ichi Nomura <j-nomura@...jp.nec.com>,
Valdis.Kletnieks@...edu, linux-kernel@...r.kernel.org,
linux-raid@...r.kernel.org,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org, Kay Sievers <kay.sievers@...y.org>
Subject: Re: [dm-devel] linux-next - WARNING: at fs/block_dev.c:824
bd_link_disk_holder+0x92/0x1ac()
Hello, Karel.
On Thu, Jan 13, 2011 at 02:26:37PM +0100, Karel Zak wrote:
> > Yeah, sure, it's not like I can afford to avoid fixing it at this
> > point anyway, but I still want to point out it's at the wrong layer
> > and shouldn't have been added like this, really. If you want blkid to
> > identify it, the proper thing to do would be querying blk device for
> > the claimer and then use claimer-specific method to query them. It's
>
> It seems that dependencies (holders/slaves) between devices is pretty
> generic thing. Why do you think that we need claimer-specific method?
> The /sys filesystem is better that ictls in many ways.
Because sysfs is already complex enough without representing
dependency information without strictly defined strcture in it. It's
for exporting the device tree to users. We have developed interesting
ways to exploit it but it generally has proven to be a bad idea to add
symlinks without clearly defined structure beneath it. People end up
using them differently and often they don't understand how the kobject
sysfs things are wired and it ends up with a lot of cruft exporting
something which is designed by small number of people without really
considering what's going on in the rest of the hierarchy.
> > not like the current method would make sense for btrfs or whatnot.
>
> Could you be more verbose, please?
If the symlinkery was something which could properly replace
configuration and query, sure, let's standardize it and share it among
all possible claimers of block devices, but it's not. md, dm, btrfs
need to export and process way more information than can be represnted
in these symlinks and it's there more as a pretty thing than anything
which is actually necessary and useful. And the original
implementation directly played with kobjects (in an unnecessarily
complicated way too) and allowed any kobject to be linked. Things
like that just never end up pretty.
So, just don't do it. Sysfs is for device hierarchy. Don't try to
shove pretty looking things there (unless it's something widely agreed
on and necessary, of course).
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists