lkml.org 
[lkml]   [2010]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] loop: add some basic read-only sysfs attributes
On Thu, Jul 29, 2010 at 04:22:50PM +0200, Kay Sievers wrote:
> On Thu, Jul 29, 2010 at 16:06, Milan Broz <mbroz@redhat.com> wrote:
> > On 07/29/2010 03:47 PM, Kay Sievers wrote:
> >> On Thu, Jul 29, 2010 at 15:33, Milan Broz <mbroz@redhat.com> wrote:
> >>> Create /sys/block/loopX/loop directory and provide these attributes:
> >>>  - backing_file
> >>>  - autoclear
> >>>  - offset
> >>>  - sizelimit
> >>>
> >>> To be used in util-linux-ng (and possibly elsewhere like udev rules)
> >>> where code need to get loop attributes from kernel (and not store
> >>> duplicate info in userspace).
> >>
> >> Isn't it that the loop attributes are created _after_ the loopdev is
> >> registered? That would make it hard to use these attributes from udev,
> >> as the event is already running while they are created.
> >
> > First 8 loop devices are registered always (without backing file),
> > so you have wait for change event initiated from fd set ioctl anyway...
> > (backing file attribute is empty in that case)
>
> Ah, so we are sure, we always get a 'change' event, and before that,
> none of these values are ever useful to read? I mean, there will not
> be attributes that are interesting during an 'add' event?

I think the patch does not change the current behavior. It exports
details about loopdevs to userspace by /sys. This is the primary goal
of the patch.

Karel

--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-07-29 17:01    [W:0.070 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site