Thread (18 messages) 18 messages, 7 authors, 2017-04-04

Re: [PATCH 0/2] overlayfs: support freeze/thaw/syncfs

From: Amir Goldstein <amir73il@gmail.com>
Date: 2017-01-19 19:03:14
Also in: linux-fsdevel

On Thu, Jan 19, 2017 at 2:13 PM, Amir Goldstein [off-list ref] wrote:
Miklos,

I implemented freeze/thaw of overlayfs, because I need it for
overlay snapshots (CoW decision is made before mnt_wat_write(upper)
and I need to serialize it with snapshot take).
Miklos, Jan,

I would be grateful if you guys could help me clarify something wrt
freezefs vs. remount.
I hope you may be able to enlighten me with just the information
provided in this email
without having to dive into overlayfs snapshot details.

I implemented 'snapshot take' for overlayfs snapshots using a command like:
mount -o remount,snapshot=/snap/N /mnt

The 'snapshot take' moment from overlayfs writers perspective is when
a single pointer
is modified via rcu_assign_pointer(ufs->__snapmnt, snapmnt):

https://github.com/amir73il/linux/commit/f0d6759efb7a6281ecc55dcdf33837568f71d29a

I chose to use the remount_fs() API because it is convenient and make sense from
user POV, but I could also use some IOCTL API for snapshot take.

For consistency of snapshot from application POV, I need to do:
fsfreeze -f
snapshot take
fsfreeze -u

But then I cannot use the remount_fs() API which requires that fs be unfrozen.

Can you please explain why do_remount_sb() requires that fs be unfrozen?

Would it be possible to relax this requirement depending on remount flags?

The reason I ask is because overlay remount does not do any writes nor
call mnt_want_write() for that matter.

Thanks,
Amir.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help