Re: broken device locking, sg vs. sg_io on block devices

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eduard Bloch
Date: Saturday, March 31, 2007 - 3:40 pm

#include <hallo.h>
* Alan Cox [Sat, Mar 31 2007, 11:20:02PM]:

Again, what does that have to do with the problem at hand? Our problem is
not about locking on a single file (no matter which mechanism is used)
but the coordination of locks _behind_ the userspace access. Or
alternatively reassigning all access to one device file.


For such uses one can omit the locking. Problem solved.


So? Then let's make /etc/shadow privilegded too: chmod a+r /etc/shadow


Nice try, but where are the different conflicting drivers with different
userspace interfaces? Do you have some more flawed comparisons of that
kind?


Again, it doesn't have to. It can pass the locking operations to the
related block device driver.

The alternative is finding a mapping to the correct block device and act
on this one (with O_EXCL or with fcntl, or both). Sysfs looks like a
good method to get information for such mapping but unfortunately you
(kernel developers) are going to cut even this last path soon (see
CONFIG_SYSFS_DEPRECATED and its bold description).

Is there any other way I need to know about? Some Voodoo ioctl?

Regards,
Eduard.

-- 
<alphascorpii> hm, was kann man denn so aus brot machen ...
<maxx> knusprige ente (mit etwas geduld)
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
broken device locking, sg vs. sg_io on block devices, Eduard Bloch, (Fri Mar 30, 4:17 am)
Re: broken device locking, sg vs. sg_io on block devices, Christoph Hellwig, (Fri Mar 30, 6:43 am)
Re: broken device locking, sg vs. sg_io on block devices, Jan Engelhardt, (Fri Mar 30, 12:09 pm)
Re: broken device locking, sg vs. sg_io on block devices, Eduard Bloch, (Sat Mar 31, 10:07 am)
Re: broken device locking, sg vs. sg_io on block devices, Eduard Bloch, (Sat Mar 31, 3:40 pm)