All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolabs.com>
To: Andrew Morton <akpm@zip.com.au>
Cc: Andy Gaynor <silver@silver.unix-fu.org>, linux-kernel@vger.kernel.org
Subject: Re: losetuping files in tmpfs fails?
Date: Thu, 3 Jan 2002 16:42:46 -0700	[thread overview]
Message-ID: <20020103164246.G12868@lynx.no> (raw)
In-Reply-To: <3C2F0AEE.ACABAAFA@silver.unix-fu.org> <3C34E4DF.F439FD70@zip.com.au>
In-Reply-To: <3C34E4DF.F439FD70@zip.com.au>; from akpm@zip.com.au on Thu, Jan 03, 2002 at 03:10:23PM -0800

On Jan 03, 2002  15:10 -0800, Andrew Morton wrote:
> Andy Gaynor wrote:
> > Whilst trying to figure out why my dang stripes won't persist (a separate
> > but worrisome issue), I wrote a dittie which creates a couple junk files in
> > /tmp (tmpfs), associates loop devices with them, whoops, losetup craps out.
> > 
> > ...
> >   /tmp# mount | grep tmp                # Filesystem is ...
> >   tmpfs on /tmp type tmpfs (rw)         #   tmpfs
> >   /tmp# echo foo > foo                  # Create file foo
> >   /tmp# losetup /dev/loop/5 foo         # Give foo to /dev/loop/5
> >   ioctl: LOOP_SET_FD: Invalid argument  # DISCO!!!          <o >  <o >
> 
> Yup, tmpfs doesn't provide some of the facilities which the
> loop driver requires.   Specifically, prepare_write() and 
> commit_write().  
> 
> Probably it's not too hard to change loop to use generic_file_write(),
> and it will then permit tmpfs file-backed loop mounts.
> 
> It's not obvious that there's a burning need to support loop-on-tmpfs
> though, is there?

Well, if you are using tmpfs as your /tmp filesystem (presumably not
such a strange situation given the name ;-), then any tool which creates
a loopback in /tmp will break.  Good examples would be mkinitrd, or
anything that is generating a floppy image (e.g. Linux Router Project
floppy, boot floppy tools, etc).

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/


  parent reply	other threads:[~2002-01-03 23:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-30 12:39 losetuping files in tmpfs fails? Andy Gaynor
2002-01-03 23:10 ` Andrew Morton
2002-01-03 23:42   ` David Golden
2002-01-03 23:42   ` Andreas Dilger [this message]
2002-01-04 10:38   ` Andy Gaynor
  -- strict thread matches above, loose matches on Subject: below --
2002-01-04 18:47 Ishan Oshadi Jayawardena
2002-01-05 23:18 ` H. Peter Anvin
2002-01-05 21:51 Frédéric L. W. Meunier
2002-01-05 23:20 ` H. Peter Anvin
2002-01-06  0:15 ` Guest section DW

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=20020103164246.G12868@lynx.no \
    --to=adilger@turbolabs.com \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=silver@silver.unix-fu.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.