Message ID | 20250421021509.2366003-11-yi.zhang@huaweicloud.com |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=YXZx=XH=vger.kernel.org=linux-ext4+bounces-7351-patchwork-incoming=ozlabs.org@ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org; envelope-from=srs0=yxzx=xh=vger.kernel.org=linux-ext4+bounces-7351-patchwork-incoming=ozlabs.org@ozlabs.org; receiver=patchwork.ozlabs.org) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Zgq6G26Nbz1yMZ for <incoming@patchwork.ozlabs.org>; Mon, 21 Apr 2025 12:28:06 +1000 (AEST) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4Zgq6c1HJpz4wd0 for <incoming@patchwork.ozlabs.org>; Mon, 21 Apr 2025 12:28:24 +1000 (AEST) Received: by gandalf.ozlabs.org (Postfix) id 4Zgq6c1Ddsz4x1w; Mon, 21 Apr 2025 12:28:24 +1000 (AEST) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; arc=pass smtp.remote-ip="2604:1380:4601:e00::3" arc.chain=subspace.kernel.org ARC-Seal: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1745202504; cv=pass; b=Eiu9DDYturX2FY+jA6rNfIOYzKEVBjKxs2kspQ82OhvSj0ovBbSQyF0rgwhk8Vlz2omKOByA5WV2k2VEEsH9Ry2ye2NI2MtwS5ulDNY8xR5P+4SCah95mxk3w0zbOMk/573vz7911S1POd8Hm+0j99j1iHlQvCOsMymcGSw0YX1jkuuhaoEraaZHGX57UYKlgX9irFEJLwLYM1gZTGdfVokr9TjS9AUrxmrNt/xyZD2oPlIy06qtxBf28RX6o0IiusmZC4Kr8hwSMV2TBKkqe8WEySrbuFiBVuAfYmprKIwda/llyz4+t/Z5qkWAVW9SLZfmhQHO1rLW/Lj1frkotg== ARC-Message-Signature: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1745202504; c=relaxed/relaxed; bh=jz7y2Yhezni9yPEb9lCUlYteShCkjN5wd9fBoAC50o8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TpKGe4Quur6H+sY5TNiXzMPM6JQff3K26sYzhIG0+VqDUwvoIC9W0s5EL4ezmCp+5K87f1Ww8zeRkuhWmMvVuxrw/LWdVeXV+Dqfhp8p4vKRtSbGrEa+d1py1GxnTw6rcMZOLoFizwAlbB7W6ksnqAJGb5k3VadrQ78zf180dpGd8r+g/h8u0BTdBOwrMqGwBSTgTYKTeOzD/wj9T6SMg0fGghQbpcdQ8N7uZVKGQzDbXfLinxalkW4q6/K8FPQzsJzpwdTsYNZAziCzvHPR6I3oOPoSxbr6+q9agk6OOcO9aE0ENudqmn8JJn6cQcotXj5k+JEpOkIqJJG2vi1E+w== ARC-Authentication-Results: i=2; gandalf.ozlabs.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=vger.kernel.org Authentication-Results: gandalf.ozlabs.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: gandalf.ozlabs.org; spf=pass smtp.mailfrom=vger.kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by gandalf.ozlabs.org (Postfix) with ESMTPS id 4Zgq6X5Wqjz4wd0 for <patchwork-incoming@ozlabs.org>; Mon, 21 Apr 2025 12:28:20 +1000 (AEST) Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8DD8D1892869 for <patchwork-incoming@ozlabs.org>; Mon, 21 Apr 2025 02:28:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B964F25B672; Mon, 21 Apr 2025 02:25:40 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) (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 7F7252594B7; Mon, 21 Apr 2025 02:25:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745202340; cv=none; b=KUNOOlLE2YX1BY4tHvRdJJ//H628CSJiYSnPTvTC/OFMN0pukGq5us21xwqoSiKKK/wfXGNueqDSRTkH/qsmL5YVVZWcfoWzSqv0p3wPk916KAhrZPwFiAAlZXIZBB1CfuUa6O7PZ6kmYVn8BKXVcQnkdb9tUtjyKN+3QGj51VY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745202340; c=relaxed/simple; bh=dbx1O5LRvizIxHVuFcCjz8LdYe/dQeErtAxlf0hID7k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=flVQBppNXuyvFDHtaVgYVnsSgHz0tJUruW4PA/LTGNifKAgzFooxxL+Npzp2NRHGZN7Y4V4FS9pq+hfAA+0Oiwl4gWM+sl+PtEjPiWMwsKP6+yV1PwP1+VeWjEnLbj1gytkJSFOr32QcoAGJhlnMmrebWadGBuGI4PkU7iqg0NQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4Zgq2t1Yxkz4f3mHR; Mon, 21 Apr 2025 10:25:10 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 8ACD81A1B81; Mon, 21 Apr 2025 10:25:35 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.112.188]) by APP4 (Coremail) with SMTP id gCh0CgA3m1+MrAVoFxZkKA--.3102S14; Mon, 21 Apr 2025 10:25:35 +0800 (CST) From: Zhang Yi <yi.zhang@huaweicloud.com> To: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-block@vger.kernel.org, dm-devel@lists.linux.dev, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, hch@lst.de, tytso@mit.edu, djwong@kernel.org, john.g.garry@oracle.com, bmarzins@redhat.com, chaitanyak@nvidia.com, shinichiro.kawasaki@wdc.com, brauner@kernel.org, yi.zhang@huawei.com, yi.zhang@huaweicloud.com, chengzhihao1@huawei.com, yukuai3@huawei.com, yangerkun@huawei.com Subject: [RFC PATCH v4 10/11] block: add FALLOC_FL_WRITE_ZEROES support Date: Mon, 21 Apr 2025 10:15:08 +0800 Message-ID: <20250421021509.2366003-11-yi.zhang@huaweicloud.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20250421021509.2366003-1-yi.zhang@huaweicloud.com> References: <20250421021509.2366003-1-yi.zhang@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: <linux-ext4.vger.kernel.org> List-Subscribe: <mailto:linux-ext4+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-ext4+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgA3m1+MrAVoFxZkKA--.3102S14 X-Coremail-Antispam: 1UD129KBjvJXoW7Zry7Wr4xCr18Cw13ury3Arb_yoW8Xry7pF WDXF15JFZYgas3GF1fCF4q9rn5Za1kJryrGa1xK3WF9wsxJF97Kr1DWF45ta4UWFy7Aw4k Zr9Igr98ua17ArDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUmS14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_JF0E3s1l82xGYI kIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2 z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F 4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oVCq 3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7 IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4U M4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628vn2 kIc2xKxwCY1x0262kKe7AKxVW8ZVWrXwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkE bVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67 AF67kF1VAFwI0_GFv_WrylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVW8JVW5JwCI 42IY6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF 4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x0267AKxVW8Jr0_Cr1UYxBI daVFxhVjvjDU0xZFpf9x0pRQJ5wUUUUU= X-CM-SenderInfo: d1lo6xhdqjqx5xdzvxpfor3voofrz/ X-Spam-Status: No, score=-0.1 required=5.0 tests=ARC_SIGNED,ARC_VALID, DMARC_MISSING,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org |
Series |
fallocate: introduce FALLOC_FL_WRITE_ZEROES flag
|
expand
|
diff --git a/block/fops.c b/block/fops.c index 77a5465309e7..e590c8997689 100644 --- a/block/fops.c +++ b/block/fops.c @@ -803,7 +803,7 @@ static ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *to) #define BLKDEV_FALLOC_FL_SUPPORTED \ (FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE | \ - FALLOC_FL_ZERO_RANGE) + FALLOC_FL_ZERO_RANGE | FALLOC_FL_WRITE_ZEROES) static long blkdev_fallocate(struct file *file, int mode, loff_t start, loff_t len) @@ -847,6 +847,9 @@ static long blkdev_fallocate(struct file *file, int mode, loff_t start, case FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE: flags = BLKDEV_ZERO_NOFALLBACK; break; + case FALLOC_FL_WRITE_ZEROES: + flags = 0; + break; default: error = -EOPNOTSUPP; goto fail;