public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolabs.com>
To: Mark Swanson <swansma@yahoo.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: Request: removal of fs/fs.h/super_block.u to enable partition locking
Date: Wed, 19 Sep 2001 17:06:06 -0600	[thread overview]
Message-ID: <20010919170606.S14526@turbolinux.com> (raw)
In-Reply-To: <E15jn1X-0003cU-00@the-village.bc.nu> <3BA8F6EC.E3D73C87@yahoo.com>
In-Reply-To: <3BA8F6EC.E3D73C87@yahoo.com>

On Sep 19, 2001  15:50 -0400, Mark Swanson wrote:
> > However you don't need to remove anything for that
> 
> But I can't distribute the file fs with my application, because I can't
> expect my user base to patch and recompile their kernel just so they can
> run my application.
> 
> Perhaps what is needed is an 'inuse' filesystem or a way to make 
> filesystem modules without patching the kernel. 

You don't need to patch the kernel to add a new filesystem type.  It
is possible to just use "&inode->u.generic_ip" as your filesystem
private inode storage (if you actually need any, which is unlikely with
such a simple filesystem).  All of the other VFS interfaces are exported
to modules, so it is possible to just insert a module to add your fs
type.

When I was doing this (compiling a filesystem that is not part of the
kernel), we used the pcmcia-cs configure scripts to get all of the
relevant kernel config options.  This can be done on a running kernel
without having the actual kernel sources, and if you do this as part
of the startup for your application, you can cache the kernel version
string (from /proc/version) to ensure that the module is always OK
for the current kernel.

Of course, if your code is good enough it may just make it into the
kernel.

> My concern is that ordinary tools like mount check the proc filesystem
> to see if a partition is already mounted and it seems likely that tools
> like mke2fs do this too. Sysadmins might feel that existing tools
> protect them from damaging something in use. I'm looking for a way to
> follow this general behavior with raw partitions.

You are correct.  mke2fs refuses to run on a device where a filesystem
appears to be mounted (either in /proc/mounts or /etc/mtab), unless
you force it to do so.

Cheers, Andreas
--
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert


  parent reply	other threads:[~2001-09-19 23:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-19  2:14 Request: removal of fs/fs.h/super_block.u to enable partition locking Mark Swanson
2001-09-19  6:00 ` Andreas Dilger
2001-09-19 19:28 ` Alan Cox
2001-09-19 19:50   ` Mark Swanson
2001-09-19 21:52     ` Request: removal of fs/fs.h/super_block.u to enable partition Alan Cox
2001-09-19 23:16       ` Andreas Dilger
2001-09-19 23:06     ` Andreas Dilger [this message]
2001-09-19 20:26   ` Request: removal of fs/fs.h/super_block.u to enable partition locking Andreas Dilger

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=20010919170606.S14526@turbolinux.com \
    --to=adilger@turbolabs.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swansma@yahoo.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox