mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grant Miner <mine0057@mrs.umn.edu>
To: linux kernel <linux-kernel@vger.kernel.org>
Subject: New idea for file-based mounts
Date: Thu, 03 Jul 2003 01:56:07 -0500	[thread overview]
Message-ID: <3F03D387.8000501@mrs.umn.edu> (raw)

Instead of using mount/umount syscalls, have a file that exists 
per-directory named, say, ..mount.  Then, to mount /dev/sda at /home, 
you issue the command
echo "/dev/sda rw" > /home/..mount
(Almost the same syntax as mtab.) The OS takes action (upon modification 
of the ..mounts file) and attempts the mount.  Reading back the file 
would show:
/dev/sda rw

if the mount suceeded, otherwise it would be null if there is an error.  
To unmount the file system, remove that line from the ..mounts file.

Now, if you want to do layered mounts, a la plan 9, you could search 
from the top line through the last line.  Say you had a directory, 
/programs.  You want to make a union of directories together, so you 
make /programs/..mounts look like:
/home/root/bin rw
/bin ro
/sbin ro
/usr/bin ro

Since /home/root/bin rw is read-write, any newly written files in 
/programs really go in /home/root/bin.  But you see files from each of 
the four directories (unless they have duplicate names, then higher in 
the list takes precedence) due to the unioning.

Why do this? A few reasons: one could set unix permissions/acl's on the 
..mounts file--you could easily let non-root users perform mount 
operations on certain directories.  Then you don't need mount and 
unmount commands as well.



                 reply	other threads:[~2003-07-03  6:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3F03D387.8000501@mrs.umn.edu \
    --to=mine0057@mrs.umn.edu \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®