Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1476471lqj; Tue, 4 Jun 2024 02:45:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVHdWyvhqPXoUR5hYcavb/dNTpOndTs8NpZr2ZgCYEXgTB2xc2SpVZsBWUSho+uOk+djX0pzc1o9RO1b6C0VnLWiMwoDURirWXP9qlgKg== X-Google-Smtp-Source: AGHT+IFY3To9E7VY27oNfv/CFR40plICqVt0z5tom5G7lhMiAyW56c9dFzKZpUjPwFY2SKgQiWOc X-Received: by 2002:a50:8d1d:0:b0:578:6782:5788 with SMTP id 4fb4d7f45d1cf-57a363827d7mr6807223a12.5.1717494328386; Tue, 04 Jun 2024 02:45:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717494328; cv=pass; d=google.com; s=arc-20160816; b=n0IE+VDmINWQFjLP+pLdEaQBembUAsBq6fHVUbzyfy35i0R3b2nvgy2zkYDBB22y6T PE6IC1vFKvou65IJxcupc3/XhtFfETvSrX+mud068Me0TqfsMYJV4Rgs5SEc4ypEfuZP Vv7Le6KfR+FkHaudj8JbXgOoW6yBsne6Yjnt7suGnfpFi0Q1fv6w0l0l7bwc9nLS+Iwd IjA16bNDVIdyve//KjxnNdQGs7lIAZXW55iT4zUhQuAc2pYfbBp958mf8wyxLu2MFNmn ObhpbCL9WLp9hq74+Uaqq5jLfF228TZRZHQNm/JSNdWdaHmdUe7dKelv/zdaPzz/vA3y Rb8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/wyixPQKPllzlkQ6nP0MNk7Q+TX9oe0qPOvgtCB3QtA=; fh=KsuVa80eVaTrreYX+3rfJZiyIvYR8F3xAtEXFF+hcSY=; b=lOW6XafMzzWYX1KeE0yAGQOp5Q9/ZGgoexKFQagam6V6MgT4LrbHTZnyvRrkVX3+Ad sFoE1hJbqWCffYS+eAZQvYezOC7C9Qwch4nzaXSqBBRN5ztLvc6Qwoh4zd7GJnPv04qx mEYZHkrc+RXYXWZ5wogpsn7nkkOijCTUAR9Ba0FzyxKdQzXwlSMlnNfkwRaw2wc8Jj0S 1uHZh0uAhDEOflPYLKYfmOBtrJGvuWTIboK+Qzgo1YrUtTW9CjHiIbTEK4Bl0ZW2Rca6 mfgx8aGFpXA+wVdlaBjl6vZ/LpNz+1izwkroVeSMkh0OOvtbzsF1pUT39BRVn0F7/DBE Zhlg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@pankajraghav.com header.s=MBO0001 header.b=YtAkYBgi; arc=pass (i=1 spf=pass spfdomain=pankajraghav.com dkim=pass dkdomain=pankajraghav.com dmarc=pass fromdomain=pankajraghav.com); spf=pass (google.com: domain of linux-kernel+bounces-200377-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200377-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pankajraghav.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31b816c5si4916856a12.9.2024.06.04.02.45.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 02:45:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200377-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@pankajraghav.com header.s=MBO0001 header.b=YtAkYBgi; arc=pass (i=1 spf=pass spfdomain=pankajraghav.com dkim=pass dkdomain=pankajraghav.com dmarc=pass fromdomain=pankajraghav.com); spf=pass (google.com: domain of linux-kernel+bounces-200377-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200377-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pankajraghav.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 720691F23FC6 for ; Tue, 4 Jun 2024 09:44:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 599911448EB; Tue, 4 Jun 2024 09:43:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pankajraghav.com header.i=@pankajraghav.com header.b="YtAkYBgi" Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [80.241.56.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D20EE1442EF; Tue, 4 Jun 2024 09:43:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.161 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717494225; cv=none; b=Y1Ry6+ZGtRPsEfcCjPm4NjW3YoP1mHBznXSCnQlZexZ5mBEWnhZfJRxRHPiMDsyaKOb8TY16apuBnH4brbmk4qV5qdTqF/UuK+UqOoIkw+zGPH53q2wbF45Sl2nlMRwpLyfUw7/xOCFe0JDT5Jz9hk20nv7fxOpQuaOCAbb/XDA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717494225; c=relaxed/simple; bh=5RkdUsK0tny5QZcZrgeZEhT5qBBrTYbEIMgRpQp+U/c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JREG71UZ87n/wBjSaCoEm39R50ZPY0/D7uaqAepgR7qFrV6dfIQMEseapI4Z7Gf7x5xcUYUlsnu2uex3U6sL9JHjEx1ID3CNxYdiAjq3oAYwPS6/4Er3OPjuHYVFnLUzaV5WaOQix+6ye60CBgufGn1GUYqpodnru3QKWcoX5K4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pankajraghav.com; spf=pass smtp.mailfrom=pankajraghav.com; dkim=pass (2048-bit key) header.d=pankajraghav.com header.i=@pankajraghav.com header.b=YtAkYBgi; arc=none smtp.client-ip=80.241.56.161 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pankajraghav.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pankajraghav.com Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4Vtlyt3kv8z9sqF; Tue, 4 Jun 2024 11:43:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pankajraghav.com; s=MBO0001; t=1717494214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/wyixPQKPllzlkQ6nP0MNk7Q+TX9oe0qPOvgtCB3QtA=; b=YtAkYBgiDiiLTrSB1xXRBsq9S9oVQd4+fGLl114XZLZfFLqEjmSRSi3OD/ewx2b4xsFrin b31N9SmU65EekOzDKNDv/0VOdTQC76P9QfvlKf2AMY5TZpbIK/XI8ojK3aSFwdx+DAE6j5 TUrzR5fJsAaKzjhai6vLP5SOdNCd31xk0yfdOo3EPOJGxACiklOpHTpNuPSoQSkjXee9V+ bfUAHw5Bx49k5i6dyWfpCfn8RpXkeCERgAjUoxIKsiaVISFqz3t1aeX8py5FO6HZnWBB+i j5epziGzDMKCXz/rHreSnRbSe6R5xg7SFo73vhNBVNNuRmT53/F2MZP0GtcEEA== Date: Tue, 4 Jun 2024 09:43:31 +0000 From: "Pankaj Raghav (Samsung)" To: Dave Chinner Cc: chandan.babu@oracle.com, akpm@linux-foundation.org, brauner@kernel.org, willy@infradead.org, djwong@kernel.org, linux-kernel@vger.kernel.org, hare@suse.de, john.g.garry@oracle.com, gost.dev@samsung.com, yang@os.amperecomputing.com, p.raghav@samsung.com, cl@os.amperecomputing.com, linux-xfs@vger.kernel.org, hch@lst.de, mcgrof@kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v6 07/11] iomap: fix iomap_dio_zero() for fs bs > system page size Message-ID: <20240604094331.gybm6la3xdunpcin@quentin> References: <20240529134509.120826-1-kernel@pankajraghav.com> <20240529134509.120826-8-kernel@pankajraghav.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Vtlyt3kv8z9sqF > > static int __init iomap_init(void) > > { > > + zero_fs_block = alloc_pages(GFP_KERNEL | __GFP_ZERO, ZERO_FSB_ORDER); > > + if (!zero_fs_block) > > + return -ENOMEM; > > + > > return bioset_init(&iomap_ioend_bioset, 4 * (PAGE_SIZE / SECTOR_SIZE), > > offsetof(struct iomap_ioend, io_bio), > > BIOSET_NEED_BVECS); > > just create an iomap_dio_init() function in iomap/direct-io.c > and call that from here. Then everything can be private to > iomap/direct-io.c... Sounds good :)