Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1086492ybx; Wed, 30 Oct 2019 09:38:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4Iy1NBkYGLtlBfJY2EeJt9Mq+IkXar6RyaxCYnlsAVaGrHVBLq9HVuX5snUceBN2WX+0Q X-Received: by 2002:a50:b6f8:: with SMTP id f53mr637179ede.29.1572453492757; Wed, 30 Oct 2019 09:38:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572453492; cv=none; d=google.com; s=arc-20160816; b=FAlcFJYdhz8KRwiiLwR4OzlXZuIDnrx2zI6CSUt899vUlPdRbfwvZur94GBYEuQzK5 oFEo32sPetscW4KCrIkk63RRTIt5WGvEYjFgaGcl5k8fUK4CSpwiPj5UCgvZpFgwe3QA igJtU/EXBmyhkH8gcxAc5wR4aCgoVyZ/hiNv2R6oCb/DfAxXpH47Nw8HeY7fOLiE4Pnt TqJvz+ZDTQQxOLtxFghO2egd3iomBr5VIvq7uV+CYnIT32oIOrRF8M6vArEWTv9kzxb5 H2K2IBh++lTzgZqbLrTHt/wQNmf4H1AbCWu74JyxnFyv5louzLpnGtux4IA6ofXBxGgI zlOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=sOObYlWZ41xTgAHiCQDNKqzntjN7TJ231wc+n79zdBk=; b=N/hZ/wLUjQ7dSfEOuCXmTK2RcJ73/5I1y5yRUpmezvBIacxgk1CBHZdXlfBxIRqX6s +H1jpp5HydtjcA1rT3YHaSQyWb5aqD5DllyeyiPpQmmCr01sknNPU3iWOsTNaOvPZwPz 7U/Hdxz21g7UQ2Dcmt9rmiOV6lFsnzpIiKEbz/ekg3WAJBgzqNUZjrGABybSSZ3JzhPf AJAS6J9xHJvG2zgusZ0yU3lHQKU7ju+qrh03HLjeogWav189SzmiCHMU8fRYhrQ1/FYE CfPE1wBO7vNgtCu5wYa2VCPn9r6Sk081mQMAi7/CxA/B/A+Pqcl3PMbJnR39fZF6aqSR rg7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iGba95ge; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k23si1477004ejc.433.2019.10.30.09.37.37; Wed, 30 Oct 2019 09:38:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iGba95ge; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726640AbfJ3QdP (ORCPT + 99 others); Wed, 30 Oct 2019 12:33:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:43640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726261AbfJ3QdP (ORCPT ); Wed, 30 Oct 2019 12:33:15 -0400 Received: from localhost (unknown [104.132.0.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6BA1D208E3; Wed, 30 Oct 2019 16:33:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572453194; bh=R+x/BiJjAABhO4MBomPKbzt94Ok4oo5wUPTX569SJ6g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iGba95geeKSbcCK9GWjQH/AJCr6qa7QkMYrle1YEL/ZwFd5UUcgg+TCYjJYgTBXF6 PgpoepMXz5caV3srmydmo6B7IvFHf9OuWgvDXgt/sAtNqr7U2TcGYQl8sXUGhz60MW MhURFz/qimcPaK+szHYt2Tw0wv62Fvj1P0B5gmsg= Date: Wed, 30 Oct 2019 09:33:13 -0700 From: Jaegeuk Kim To: "Theodore Y. Ts'o" Cc: Gao Xiang , Gao Xiang , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH] f2fs: bio_alloc should never fail Message-ID: <20191030163313.GB34056@jaegeuk-macbookpro.roam.corp.google.com> References: <20191030035518.65477-1-gaoxiang25@huawei.com> <20aa40bd-280d-d223-9f73-d9ed7dbe4f29@huawei.com> <20191030091542.GA24976@architecture4> <19a417e6-8f0e-564e-bc36-59bfc883ec16@huawei.com> <20191030104345.GB170703@architecture4> <20191030151444.GC16197@mit.edu> <20191030155020.GA3953@hsiangkao-HP-ZHAN-66-Pro-G1> <20191030162243.GA18729@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191030162243.GA18729@mit.edu> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/30, Theodore Y. Ts'o wrote: > On Wed, Oct 30, 2019 at 11:50:37PM +0800, Gao Xiang wrote: > > > > So I'm curious about the original issue in commit 740432f83560 > > ("f2fs: handle failed bio allocation"). Since f2fs manages multiple write > > bios with its internal fio but it seems the commit is not helpful to > > resolve potential mempool deadlock (I'm confused since no calltrace, > > maybe I'm wrong)... > > Two possibilities come to mind. (a) It may be that on older kernels > (when f2fs is backported to older Board Support Package kernels from > the SOC vendors) didn't have the bio_alloc() guarantee, so it was > necessary on older kernels, but not on upstream, or (b) it wasn't > *actually* possible for bio_alloc() to fail and someone added the > error handling in 740432f83560 out of paranoia. Yup, I was checking old device kernels but just stopped digging it out. Instead, I hesitate to apply this patch since I can't get why we need to get rid of this code for clean-up purpose. This may be able to bring some hassles when backporting to android/device kernels. > > (Hence my suggestion that in the ext4 version of the patch, we add a > code comment justifying why there was no error checking, to make it > clear that this was a deliberate choice. :-) > > - Ted