From: "H. Peter Anvin" <hpa@zytor.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: David Chinner <dgc@sgi.com>, lkml <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
util-linux-ng@vger.kernel.org
Subject: Re: [BUG] remount ro on loopback mount leaves unmountable filesystem behind
Date: Tue, 13 May 2008 10:10:35 -0700 [thread overview]
Message-ID: <4829CB8B.1000500@zytor.com> (raw)
In-Reply-To: <20080513124203.GA4806@infradead.org>
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
WARNING: multiple messages have this Message-ID (diff)
From: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
To: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: David Chinner <dgc-sJ/iWh9BUns@public.gmane.org>,
lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-fsdevel
<linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
util-linux-ng-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [BUG] remount ro on loopback mount leaves unmountable filesystem behind
Date: Tue, 13 May 2008 10:10:35 -0700 [thread overview]
Message-ID: <4829CB8B.1000500@zytor.com> (raw)
In-Reply-To: <20080513124203.GA4806-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
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
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-05-13 17:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-13 8:50 [BUG] remount ro on loopback mount leaves unmountable filesystem behind David Chinner
2008-05-13 10:23 ` Christoph Hellwig
2008-05-13 10:23 ` Christoph Hellwig
2008-05-13 12:07 ` David Chinner
2008-05-13 12:42 ` Christoph Hellwig
2008-05-13 12:42 ` Christoph Hellwig
2008-05-13 17:10 ` H. Peter Anvin [this message]
2008-05-13 17:10 ` H. Peter Anvin
2008-05-13 22:55 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4829CB8B.1000500@zytor.com \
--to=hpa@zytor.com \
--cc=dgc@sgi.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=util-linux-ng@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.