linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH] BTRFS_PROG: mount.btrfs helper
@ 2013-11-03 18:38 Goffredo Baroncelli
  2013-11-03 18:38 ` [PATCH] Provide " Goffredo Baroncelli
  2013-11-03 21:23 ` [RFC][PATCH] BTRFS_PROG: " Jeff Mahoney
  0 siblings, 2 replies; 4+ messages in thread
From: Goffredo Baroncelli @ 2013-11-03 18:38 UTC (permalink / raw)
  To: linux-btrfs

Hi all,

this patch provides a mount.btrfs helper for the mount command to
mounting a btrfs filesystem.
A btrfs filesystem could spans several disks. This helper scans all
the partition to discover all the disks required to mount a filesystem.
So it is not necessary any-more to "scan" manually the partitions to mount
a filesystem via the "btrfs device scan" command.

It adds in the option parameters the devices required to mount a
filesystem. Supposing that a filesystem is composed by several disks
(/dev/sd[cdef]), when the user does "mount /dev/sdd /mnt", mount calls
mount.btrfs which int turn calls the mount(2) syscall like:
mount("/dev/sdd", "/mnt", "btrfs", 0,
"device=/dev/sdc,device=/dev/sde,device=/de/vsdf").

This helper uses both the libblkid and libmount to discover the
devices, to compute the parameters manipulation and to update the mtab
file.

I got the idea from the btrfs.wiki; its biggest gains is to avoid the
separation of scanning phases (at boot time or during the block device
discovery) from the mounting. Also mkfs.btrfs could avoid to re-do a
rescan of the devices after a formatting.

mount.btrfs doesn't add more requirement than the mount command. It
would be possible to remove the "btrfs" command from the initramfs, and
all the related scripts (in my debian both udev and btrfs-tools
packages contains three udev rules for btrfs).

Comments are welcome.

-- 
gpg @keyserver.linux.it: Goffredo Baroncelli (kreijackATinwind.it> 
Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-04  5:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-03 18:38 [RFC][PATCH] BTRFS_PROG: mount.btrfs helper Goffredo Baroncelli
2013-11-03 18:38 ` [PATCH] Provide " Goffredo Baroncelli
2013-11-03 21:23 ` [RFC][PATCH] BTRFS_PROG: " Jeff Mahoney
2013-11-03 23:07   ` Goffredo Baroncelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).