xfs
[Top] [All Lists]

RE: [PATCH 4/5] xfs: xfs_inode_free() isn't RCU safe

To: <xfs@xxxxxxxxxxx>
Subject: RE: [PATCH 4/5] xfs: xfs_inode_free() isn't RCU safe
From: "Alex Lyakas" <alex@xxxxxxxxxxxxxxxxx>
Date: Tue, 12 Apr 2016 11:55:41 +0300
Cc: <david@xxxxxxxxxxxxx>, <bbice@xxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zadarastorage-com.20150623.gappssmtp.com; s=20150623; h=message-id:from:to:cc:subject:date:mime-version:importance; bh=su4gAkiOM58MfGGBj9S2KnEDz9YPiYPLsPrAakQUIGY=; b=cBD0i0pfcDp8lfSoMGZxz2PE/kO+6MdS+dvsi9GIvskFzp5tlGHFANmLITWDJ0i5VO 3m49v8rbDadAsj9LrzTaiMIEMdFL4OYfyP9KAZg4Q8gavTC544WBhJyQan2xCPDUapAK gt8/yT9ElG4Q7T/k4ShoBQfegULbNyjWQa3o0LDcgaJGduGVah1Red5SBxKlXgShPlA2 d6KMaCmZb8L7OQjeUd5bHOGdmFZJ0LfmutvUPX1IuXIMGTY41F2sXJ5l5y+C/sgQ4U+K Ust2tSZoq2CJyZknTwDK94k3E30CtM+lEhoW8RhrkBFT9jDwUaQgP5Su/8SqHers/hih 7N9A==
Importance: Normal
Hello Dave,
 
Looking at the patch, I see that now we call xfs_idestroy_fork() in RCU callback. This can do the following chain:
 
xfs_iext_destroy => xfs_iext_irec_remove => xfs_iext_realloc_indirect=> kmem_realloc => kmem_alloc => kmem_alloc => congestion_wait()
 
At least according to documentation, the RCU callback cannot block, since it may be called from softirq context. Is this fine?
 
Thanks,
Alex.
 
P.S.: I have submitted a patch called â[PATCH] xfs: optimize destruction of the indirection arrayâ, which changes xfs_iext_destroy to call only kmem_free(). But this patch got stuck in the spam filter of the mailing list, and Brent is working to release it from there.
 
 
 
<Prev in Thread] Current Thread [Next in Thread>