From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karel Zak Date: Mon, 06 Aug 2012 13:57:56 +0000 Subject: Re: add loop device backing file in udev database Message-Id: <20120806135756.GD24621@x2.net.home> List-Id: References: <5deaf9514b7dafac35d4cdef91260ba1@poivron.org> In-Reply-To: <5deaf9514b7dafac35d4cdef91260ba1@poivron.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Thu, Jun 28, 2012 at 04:38:46PM +0200, quidame@poivron.org wrote: > >That is usually the wrong thing to do, because it can get out-of-sync, > >and udev would pretend something that is not true anymore. Right, /sys is always better place than udev db. > # losetup -d /dev/loop0 > # losetup /dev/loop0 /dev/sdc1 # sdc is USB stick There is also LOOP_CHANGE_FD ioctl, I have doubts that kernel informs userspace about this change. (but standard userspace utils does not use this ioctl) Karel -- Karel Zak http://karelzak.blogspot.com