lkml.org 
[lkml]   [2008]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG] remount ro on loopback mount leaves unmountable filesystem behind
Christoph Hellwig wrote:
> On Tue, May 13, 2008 at 10:07:10PM +1000, David Chinner wrote:
>> Anyway, I'll hard code loop device numbers into the script so
>> I can just forget about this problem. Thanks, Christoph.
>
> hardcoding them is a little dangerous because a system might aswell
> have them in use already, e.g. for CD images. Just use losetup -f to
> find the first free one and keep it in a shell variable.

losetup -f is racy, too. losetup -sf is safe, however.

-hpa


\
 
 \ /
  Last update: 2008-05-13 19:21    [W:0.039 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site