Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751616AbdGSEdp (ORCPT ); Wed, 19 Jul 2017 00:33:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:43458 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751111AbdGSEdo (ORCPT ); Wed, 19 Jul 2017 00:33:44 -0400 From: NeilBrown To: Oleg Drokin , Al Viro Date: Wed, 19 Jul 2017 14:33:33 +1000 Cc: Greg Kroah-Hartman , Andreas Dilger , Linux Kernel Mailing List , Lustre Development List Subject: Re: [PATCH 03/12] staging: lustre: llite: fix various issues with ll_splice_alias. In-Reply-To: <030281CD-CC74-429C-910F-86706CFC57DA@intel.com> References: <150041997277.20736.17112251996623587423.stgit@noble> <150042040744.20736.6110134708456645941.stgit@noble> <030281CD-CC74-429C-910F-86706CFC57DA@intel.com> Message-ID: <87o9shxcyq.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2111 Lines: 56 --=-=-= Content-Type: text/plain On Tue, Jul 18 2017, Oleg Drokin wrote: > Unfortunately this patch causes insta-crash on first stat call after mount. > Sorry, I cannot dig into this deeper right this moment, but I will a bit later. V.strange. The crash suggests that the lock, and hence the inode, is not initialized. I cannot see how that might happen. though... >> + spin_lock(&lli->lli_lock); >> + new = ll_find_invalid_alias(inode, de); >> + if (!new) >> + d_add(de, inode); >> + spin_lock(&lli->lli_lock); Had it not crashed, it would have deadlocked. That second spin_lock() should be spin_unlock() :-( I don't *think* that would have caused this crash... > I am adding Al that we discussed this code at some length and he found no problems > here, so I am a bit surprised by your findings. I'd be very happy to read Al's thoughts. > Also the reason we reinvent the d_splice_alias is because we need to > splice not just directories, but also regular files. I see that. A key simplification I bring is that directories and non-directories can be handled separately. d_splice_alias() does all we need for directories, and nothing useful for non-dirs. Thanks, NeilBrown --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAllu4R8ACgkQOeye3VZi gbl5YBAAjU1du2vREan7UbGjRpYA5mtihoM+/55Wp9eNxkdpp5t4UYhisEZSEUOg MqRjW0APfzScp5hOduFfe0/mvvppGLfFYhj8XfHAwqVnVHsxifLdl3NXv7oSAMqD UebIY0P4JsqfEPzMePBHe9u6u6xozZLYmr0U7n8YuLmdHJItSFPWkYvh/RLY1FhG 0dLPr0awAxQiw4Y+SFB+gx8k2AkUbZrt3aKX9+DOmbRpKw05PbTJvouugr9p0CRu B/dNUaFXQ3r6yxdnnWcN+D/fxYmFCkwfkuyMf12+Llpj76k5H0OOYoOX32B4XukJ wZb/Z6cqMdAzgnJwz6ZpSBOLt6PVhn9Wbtj1/E2Rn6PLdv1sGRb5uQivVzIkRYqs pWtGx4yZQfQilRyBNjvuZugvdyqFdcr7Z3a0UVQI+sJV5w+EpFy/PWKZDgmRKm+7 nHJXsZHtFO2b5m1pJ8HeXjWVhOzKk69CsiDgpqD9gqJ0yZGc7oN9X0mZNJEBMBts q4cWKI7xw4TVCfBYSqE94jHIckL7Rh013hC/NZCtTssQ1JMOE309apFBBxUNvSd9 ZorMgxpTTMWeZmoE8jiVU5r3EjHoWHO1wiXw3+w2NGuWICEopBwjv6xEL3WUzR7/ EqhsCUVcqs+JinTfUk81vO78V7xsQ3r+G3+VYA19h+f8tXIsXfo= =0NLV -----END PGP SIGNATURE----- --=-=-=--