public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: jon <jon@jonshouse.co.uk>
To: coreutils@gnu.org
Cc: linux-kernel@vger.kernel.org
Subject: Feature request, "create on mount" to create mount point directory on mount, implied remove on unmount
Date: Fri, 03 Jul 2015 13:01:59 +0100	[thread overview]
Message-ID: <1435924919.6501.432.camel@jonspc> (raw)

Hi, could I make a hugely nieve user request :-) 

Would it be possible to add a new mount option to everything?

New mount option 'com' = "create on mount" (implied remove on unmount).


Example fstab entry
/mounts/amountpoint	LABEL=notalwayshere	ext4,com


# ls /mounts
# mount /mounts/amountpoint
# ls /mounts
amountpoint
# umount /mounts/amountpoint
# ls /mounts
# 


The idea is to create a mount point directory (one level only) if does
not exist when an FS is mounted, umount would remove it when an FS is
unmounted (assuming it was empty) otherwise generate a warning.

As the 'com' flag would need to carried with the mount I assume the
logic would have to be handled in mount() and umount() call itself ?

I can see issues if the mount point directory is read only or similar,
but I am sure most cases could be handled with just a warning.

Many thanks,
Jon



             reply	other threads:[~2015-07-03 12:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-03 12:01 jon [this message]
2015-07-04 20:56 ` Feature request, "create on mount" to create mount point directory on mount, implied remove on unmount Valdis.Kletnieks
2015-07-04 22:48   ` jon
2015-07-05 14:29     ` Al Viro
2015-07-05 15:46       ` jon
2015-07-05 17:39         ` Al Viro
2015-07-05 23:35           ` jon
2015-07-06  1:08             ` Al Viro
2015-07-06  2:34               ` jon
2015-07-06  3:07                 ` Al Viro
2015-07-06  5:40                 ` Valdis.Kletnieks
2015-07-15 14:38     ` 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=1435924919.6501.432.camel@jonspc \
    --to=jon@jonshouse.co.uk \
    --cc=coreutils@gnu.org \
    --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