Re: [PATCH v3] errseq: split the ERRSEQ_SEEN flag into two new flags

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

 



On Thu, Dec 17, 2020 at 10:00:37AM -0500, Jeff Layton wrote:
> Overlayfs's volatile mounts want to be able to sample an error for their
> own purposes, without preventing a later opener from potentially seeing
> the error.

umm ... can't they just copy the errseq_t they're interested in, followed
by calling errseq_check() later?

actually, isn't errseq_check() buggy in the face of multiple
watchers?  consider this:

worker.es starts at 0
t2.es = errseq_sample(&worker.es)
errseq_set(&worker.es, -EIO)
t1.es = errseq_sample(&worker.es)
t2.err = errseq_check_and_advance(&es, t2.es)
	** this sets ERRSEQ_SEEN **
t1.err = errseq_check(&worker.es, t1.es)
	** reports an error, even though the only change is that
	   ERRSEQ_SEEN moved **.

i think errseq_check() should be:

	if (likely(cur | ERRSEQ_SEEN) == (since | ERRSEQ_SEEN))
		return 0;

i'm not yet convinced other changes are needed to errseq.  but i am
having great trouble understanding exactly what overlayfs is trying to do.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux