From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Subject: Re: [dm-devel] linux-next - WARNING: at fs/block_dev.c:824 bd_link_disk_holder+0x92/0x1ac() Date: Fri, 14 Jan 2011 16:23:56 +0100 Message-ID: References: <20110113131216.GF30719@htj.dyndns.org> <20110113132637.GH16523@nb.net.home> <20110113133722.GG30719@htj.dyndns.org> <4D2F04FF.1070309@redhat.com> <20110113141107.GI30719@htj.dyndns.org> <4D2F0B6A.6010201@redhat.com> <20110113155955.GI16523@nb.net.home> <20110114150736.GJ16523@nb.net.home> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Tejun Heo , Milan Broz , device-mapper development , "Jun'ichi Nomura" , Valdis.Kletnieks@vt.edu, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Alexander Viro , linux-fsdevel@vger.kernel.org To: Karel Zak Return-path: Received: from mail-fx0-f46.google.com ([209.85.161.46]:56816 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757680Ab1ANPYX convert rfc822-to-8bit (ORCPT ); Fri, 14 Jan 2011 10:24:23 -0500 In-Reply-To: <20110114150736.GJ16523@nb.net.home> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jan 14, 2011 at 16:07, Karel Zak wrote: > On Thu, Jan 13, 2011 at 05:10:02PM +0100, Kay Sievers wrote: >> On Thu, Jan 13, 2011 at 16:59, Karel Zak wrote: >> > On Thu, Jan 13, 2011 at 03:43:38PM +0100, Kay Sievers wrote: >> >> On Thu, Jan 13, 2011 at 15:30, Tejun Heo wrote: >> >> > On Thu, Jan 13, 2011 at 3:25 PM, Milan Broz = wrote: >> >> >> Maybe, but this was not invented in DM/MD camp:-) >> >> >> Probably Kay or Greg can answer why it was done this way? >> >> >> >> It's not from Greg or Kay. It just appeared some day in the conte= xt of dm. :) >> >> >> >> And yes, symlinks *look* nice and simple for the outside, but the= y are >> >> not, and have all sorts of problems like non-atomic updates, make= it >> > >> > =C2=A0Sounds like sysfs implementation problem, right? >> >> It's a normal multi-file problem. It can by-definition not be atomic >> without doing really weird locking things. > > =C2=A0BTW, lsblk(8) and libblkid don't depend on the fact that slaves= /holders > =C2=A0files are symlinks. > > =C2=A0The important thing is the filename (/sys/block/.../slaves/) > =C2=A0only. We don't follow the symlinks and we don't use readlink() = there. > > =C2=A0It means that you can replace the symlinks with regular files w= here > =C2=A0in the file contents is for example maj:min, etc. I don't think we really can change anything here, there are more users = of it. If we would go changing things here, the file names should never be the device name but the format "b8:32" for blockdevs, "n22" for the network ifindex, ... which is the unchangeable unique kernel id -- not depending on any possible device rename, or fast destroy/re-create or anything like that. Kay -- 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