Message ID | 20230424054926.26927-14-hch@lst.de (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F454C77B73 for <linux-mm@archiver.kernel.org>; Mon, 24 Apr 2023 05:50:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 02E966B0083; Mon, 24 Apr 2023 01:50:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F22EC6B0085; Mon, 24 Apr 2023 01:50:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D98106B0087; Mon, 24 Apr 2023 01:50:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id CA4CA6B0083 for <linux-mm@kvack.org>; Mon, 24 Apr 2023 01:50:24 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 9FBB58016B for <linux-mm@kvack.org>; Mon, 24 Apr 2023 05:50:24 +0000 (UTC) X-FDA: 80715209568.12.495F2A7 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf11.hostedemail.com (Postfix) with ESMTP id E068B40008 for <linux-mm@kvack.org>; Mon, 24 Apr 2023 05:50:22 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=4lxlR6Bu; spf=none (imf11.hostedemail.com: domain of BATV+e16e2fc4419b117693a1+7183+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+e16e2fc4419b117693a1+7183+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682315422; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FmYSiKdP5y3EH7nBXTpf8bIFKknqbI4piiyOLlTcqUc=; b=NEuyvY/wzCC0Fdt5sQzgDq9utx/uSOoONKC3UFYlUmNYUHW50VHiMlECHQIUeLbuA6EV7p V0TsIRfd+F15x1dJkQ9btfeicrKuaVdZQfHIrdULKLb4bTGc0dQViIQtQy9h52tjRGsU7x 312Di/hxHJ8C9s22ifgO4xMSXIgthZA= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=4lxlR6Bu; spf=none (imf11.hostedemail.com: domain of BATV+e16e2fc4419b117693a1+7183+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+e16e2fc4419b117693a1+7183+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682315422; a=rsa-sha256; cv=none; b=5YHFnyVuuWtQm7v6c7pD2vv7GuJH+wPWpK+aDOaCM5wArV+xNhrqtMAp5x/sy4He8ipFyp ooKFFR1GHvKpHkgKSsbzSX9tKjMkpqHxuX9BKsPJStDbHKSwQljjSLJcQkbnGdnmhz4zaa kbRWpoKMvvrd3RFtaDAL03SmhazofHQ= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=FmYSiKdP5y3EH7nBXTpf8bIFKknqbI4piiyOLlTcqUc=; b=4lxlR6BuJRIME1qgT/FLWEjLGd zZ93UA0UiVTZRciYnVz7BcBGh4qOlXvmDz+gYSX0gVpNssgkTRzVJ1F6XLACSvE58gCznare4IwV8 ONhbJNRO+Rb7AwP4E4aB6azTfv6WnFdtXg9Bd7cQuw7++D8vMUNKfCzGFlYk6+3rORK1s3nJno0oL 32gJ5Q9kRf7XT69Y0ns9Rw6WyLZWY36yGHyPSBD2vfFBjEti+pSoqjjyDRWgXT9qasHTXvq32XIhk aJhmCTOwekv9gG2uQmpUAPoElchnnj2w2DJgfRMI4gQ/+nTFeSLo60MajiM9lIGCzDORORrebRpsQ vbf3q+Zg==; Received: from [2001:4bb8:189:a74f:e8a5:5f73:6d2:23b8] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1pqp5U-00FP8b-21; Mon, 24 Apr 2023 05:50:09 +0000 From: Christoph Hellwig <hch@lst.de> To: Jens Axboe <axboe@kernel.dk> Cc: Miklos Szeredi <miklos@szeredi.hu>, "Darrick J. Wong" <djwong@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, David Howells <dhowells@redhat.com>, Matthew Wilcox <willy@infradead.org>, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, ceph-devel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-xfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/17] block: don't plug in blkdev_write_iter Date: Mon, 24 Apr 2023 07:49:22 +0200 Message-Id: <20230424054926.26927-14-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424054926.26927-1-hch@lst.de> References: <20230424054926.26927-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from <hch@infradead.org> by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Server: rspam05 X-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dc1/ZmICBOYGILagzuOhJFNEQbjnMC4DCiC6otoqLqU9NzlxREKknPtkd3N8TM+L2ZQz6eSVB2Q85rDAYfpVfHZGWguU503/z0vQzwdvB8SH3qspujggnsg93dsH2nVRqFk3cSJFpPUBqHU7ggWG2pdG3yiS+jkV40BzKadJsjGHEfqyD6Mf8Npj/m330BlPoTTpDAs6KZ1V5gz5Wq9PenIj0iWy6ECzhOLvLhHASbM5LX8xZJKYFNNzFGC3Ni0rn34j/TXssZZzB2P98fEOceealvC8X/8+oekIi6VrXDeIhHb3D5Q8BZh9qFYaScxMW61/9N55dtmH38dz2F78S8WPfRFP11WB8RUTsMy4gE7udnj33lie5r0R5sLGw6HIROIUborrWfJlIcdQi3iRNClgZxMEpPLCZQw7kPPpPkd+p51DP/6qr5C578NtEubzjam/chTNfSE= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
[01/17] fs: unexport buffer_check_dirty_writeback
|
expand
|
diff --git a/block/fops.c b/block/fops.c index c194939b851cfb..b670aa7c5bb745 100644 --- a/block/fops.c +++ b/block/fops.c @@ -520,7 +520,6 @@ static ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from) struct block_device *bdev = iocb->ki_filp->private_data; struct inode *bd_inode = bdev->bd_inode; loff_t size = bdev_nr_bytes(bdev); - struct blk_plug plug; size_t shorted = 0; ssize_t ret; @@ -545,12 +544,10 @@ static ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from) iov_iter_truncate(from, size); } - blk_start_plug(&plug); ret = __generic_file_write_iter(iocb, from); if (ret > 0) ret = generic_write_sync(iocb, ret); iov_iter_reexpand(from, iov_iter_count(from) + shorted); - blk_finish_plug(&plug); return ret; }
Remove the no needed plug in blkdev_write_iter. For direct I/O that issues more than a single I/O, the plug is already done in __blkdev_direct_IO, and for synchronous buffered writes, the plug is done in writeback_inodes_wb / wb_writeback, while for the other cases a plug doesn't make sense. Signed-off-by: Christoph Hellwig <hch@lst.de> --- block/fops.c | 3 --- 1 file changed, 3 deletions(-)