Re: [PATCH 12/22] fsnotify: Move queueing of mark for destruction into fsnotify_put_mark()

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

 



On Wed 04-01-17 11:28:21, Jan Kara wrote:
> On Mon 26-12-16 16:15:23, Amir Goldstein wrote:
> > On Thu, Dec 22, 2016 at 11:15 AM, Jan Kara <jack@xxxxxxx> wrote:
> > > Currently we queue mark into a list of marks for destruction in
> > > __fsnotify_free_mark() and keep last mark reference dangling. After the
> > > worker waits for SRCU period, it drops the last reference to the mark
> > > which frees it. This scheme has the disadvantage that if we hold
> > > reference to mark and drop and reacquire SRCU lock, the mark can get
> > > freed immediately which is slightly inconvenient and we will need to
> > > avoid this in the future.
> > >
> > > Move to a scheme where queueing of mark into a list of marks for
> > > destruction happens when the last reference to the mark is dropped. Also
> > > drop reference to the mark held by group list already when mark is
> > > removed from that list instead of dropping it only from the destruction
> > > worker.
> > >
> > 
> > The BEFORE section refers to what SRCU protects, which this patch
> > slightly changes. Can you please add to AFTER section, what is protected
> > by SRCU after this patch.
> 
> Ah, the changelog is a victim of me reshuffling patches. It was written in
> a situation when mark reference did not protect from any list removal yet.
> I'll rewrite it. Thanks for noticing.

So in the end I've realized this patch needs to go before patch 10 for SRCU
guarantees to work - otherwise we could free mark under the hands of
process iterating inode list under SRCU after patch 10 and before this
patch. And then the changelog is correct. So I've just reshuffled these
patches.

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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