[PATCH 0/7] safe implementation of loop reuse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Few months ago I sent a simple patch for loop reuse. It was able to
reuse loop device in simple cases, but it did not fully check for safe
usability of the loop device.

That is why I wrote new implementation that should be safe.

To keep the code as small as possible, it changes API of several
functions: it adds sizelimit check possibility.

Thing that should be done, but they are above scope of this patch set:

- The current API does not support passing the name of the conflicting
  loop device to the error reported to the user. Just now, only debug
  messages contain it.

- The same what is done for mount needs to be done for losetup.
  API is now ready for it, so it should be simple.

- Add mount option looprw. It would allow to mount read only but
  initialize loop device R/W. Required for things like:
  mount -oro,loop,looprw,subvol=snapshots/1 -tbtrfs\
   /home.img /home-snapshots/1
  mount -oloop -tbtrfs /home.img /home
  (Without looprw, /home will be mounted read-only.)

And there are still some risks above scope of this patch set:

- Risk of race conditions if two processes allocate loop device in
  parallel.

- I am not sure, whether loop reuse with combination of autoclear flag
  differences could cause preliminary releasing of loop device or
  keeping orphan loop device in some situations.

--
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                         e-mail: sbrabec@xxxxxxxx
Křižíkova 148/34 (Corso IIa)                  tel: +49 911 7405384547
186 00 Praha 8-Karlín                          fax:  +420 284 084 001
Czech Republic                                    http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux