[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0905221801470.22960-100000@iolanthe.rowland.org>
Date: Fri, 22 May 2009 18:07:13 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Kay Sievers <kay.sievers@...y.org>
cc: Alan Cox <alan@...rguk.ukuu.org.uk>,
Kyle Moffett <kyle@...fetthome.net>,
Pantelis Koukousoulas <pktoss@...il.com>,
Al Viro <viro@...iv.linux.org.uk>,
Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: How to tell whether a struct file is held by a process?
On Fri, 22 May 2009, Kay Sievers wrote:
> On Fri, May 22, 2009 at 21:31, Alan Stern <stern@...land.harvard.edu> wrote:
> > Come to think of it, putting the lock files in sysfs isn't such a good
> > idea. Â The core will need to know whether the files are open, so we'll
> > have to have our own file_operations structure for them.
> >
> > Which means the best place to put the lock files is probably somewhere
> > in /dev. Â Can this be made to work by generating appropriate uevents,
> > with the default udev rules?
>
> Nodes in /dev would need a corresponding device in /sys and belong to
> a subsystem to send an event. That sounds like a lot of stuff for a
> simple interface like this. Can't we just add ioctls to the hub device
> nodes to implement the locking?
Yes, that would work. Closing the hub device file would release all
the locked ports.
It wouldn't leave any lock files for user programs. They would have to
arrange the locking among themselves somehow. Would that be okay?
Alan Stern
--
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