8.1R possible zfs snapshot livelock?

Borja Marcos borjam at sarenet.es
Mon May 30 11:41:09 UTC 2011


On May 20, 2011, at 9:33 AM, Luke Marsden wrote:

>> If  you wish to reproduce it, try creating a dataset for /usr/obj,
>> running make buildworld on it, replicating at, say, 30 or 60 second
>> intervals, and keep several scripts (or rsync) reading the target
>> dataset files and just copying them to another place in the usual,
>> "classic" way. (example: tar cf - . | ( cd /destination && tar xf -)
>> 
> 
> Is there a PR for this?  I'd like to see it addressed, since read-only
> I/O on a dataset which is being updated by `zfs recv` is an important
> part of what we plan to do with ZFS on FreeBSD.

Hello,

Sorry for the delay to anwer. I think I added some information about this issue to a related PR but I'm unable to find it right now.

I had a discussion about this issue as well, you can read the relevant threads here:

http://osdir.com/ml/freebsd-fs/2010-03/msg00062.html

http://kerneltrap.org/mailarchive/freebsd-fs/2009/10/31/6535463/thread


In hindsight, however, unless you are working in very clearly defined conditions, it doesn't make much sense to keep even reading activity on the target dataset.

What happens if you keep a file open for reading while the "zfs recv" operation is done? What happens if you are traversing a directory, which means that you keep the directory open, and the destination dataset is "replaced" by a new one by a recv?

For read-only operations I would rely on clones instead. 





Borja.




More information about the freebsd-stable mailing list