From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ted Ts'o Subject: Re: Some way of telling which block devices are in use (and how) Date: Sun, 29 Apr 2012 18:05:12 -0400 Message-ID: <20120429220512.GC7342@thunk.org> References: <20120429201830.GA10188@kroah.com> <20120429212305.GB7342@thunk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, Al Viro To: Greg KH Return-path: Received: from li9-11.members.linode.com ([67.18.176.11]:53654 "EHLO test.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754002Ab2D2WFQ (ORCPT ); Sun, 29 Apr 2012 18:05:16 -0400 Content-Disposition: inline In-Reply-To: <20120429212305.GB7342@thunk.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: I've been looking more closely at this, and I think we can make things better by having the file system create a symlink from partition's holders directory to the file system's kobject (assuming the file system has a kobject, which most do not have). i.e., I'd add to ext4_fill_super() something like this: ret = add_symlink(bdev->bd_part->holder_dir, &ext4_kset->kobj); Currently, the holders directory will show links for md and devicemapper users of the block device. This would add a link if ext4 has the block device mounted. It's not a complete solution, but I think it would help, and as far as I can tell, it's in the spirit of how the holders directory was (partially) implemented. - Ted