From mboxrd@z Thu Jan 1 00:00:00 1970 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 8AFDF2264B1; Mon, 18 Aug 2025 01:43:02 +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=1755481386; cv=none; b=ctQEW1YCjkW2RAlKRRJ0ycLxKTikY+X0/qXoSwikPggBpOTfRuuS3/ekXwSq1PvSPjfL77DAkpRuYJVrmFy/rckmPYyACJqFE/NPtrU7GlGBFhbIZDycI7v2r10on+9nsC9KYLlWTlRN0/ZJKJ/O6RPBDdDHcFHtcgB0E8YyDAk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755481386; c=relaxed/simple; bh=3BrdEm9YWQ4b9T8dYVemL7Ff85aMXjPNNHmqsSoFDS4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rFuLyyJ63V4nRgl+Y2V8qKQmGQ56b88dudhjhvHwlBN7pMl+oOqbGQyaI3ny9p881epnPFs4S0vx4ImYfAUBuG5nXME+W357Efi41RfBW28vqgeXNOCinjAhZkhcxhbEdeN0LTa0I47fPh3FTwdgAYBBHoxEfDERO5hDkjXmwdc= 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.93.142]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTPS id 4c4wTL0jTWzYQv8W; Mon, 18 Aug 2025 09:43:02 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id A71FF1A018D; Mon, 18 Aug 2025 09:43:00 +0800 (CST) Received: from [10.174.179.80] (unknown [10.174.179.80]) by APP4 (Coremail) with SMTP id gCh0CgAHgxMfhaJo6Ns1EA--.15154S3; Mon, 18 Aug 2025 09:42:57 +0800 (CST) Message-ID: <95a4a94b-7aa0-4e3c-a386-7692dde66a4f@huaweicloud.com> Date: Mon, 18 Aug 2025 09:42:55 +0800 Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH blktests v2 0/3] blktest: add unmap write zeroes tests To: Shinichiro Kawasaki Cc: "linux-fsdevel@vger.kernel.org" , "linux-block@vger.kernel.org" , "dm-devel@lists.linux.dev" , "linux-nvme@lists.infradead.org" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , hch , "tytso@mit.edu" , "djwong@kernel.org" , "bmarzins@redhat.com" , "chaitanyak@nvidia.com" , "brauner@kernel.org" , "martin.petersen@oracle.com" , "yi.zhang@huawei.com" , "chengzhihao1@huawei.com" , "yukuai3@huawei.com" , "yangerkun@huawei.com" References: <20250813024421.2507446-1-yi.zhang@huaweicloud.com> <7dswufawxmyqblokjesulhdexqld3bx7sycgmylbaeqs43ougk@25rseyqm3beg> Content-Language: en-US From: Zhang Yi In-Reply-To: <7dswufawxmyqblokjesulhdexqld3bx7sycgmylbaeqs43ougk@25rseyqm3beg> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CM-TRANSID:gCh0CgAHgxMfhaJo6Ns1EA--.15154S3 X-Coremail-Antispam: 1UD129KBjvJXoW7WFy3tFy8uFWrXr15tr1rXrb_yoW8tw15pr W5Xa4Dtws8GrWDJa4vvayq9Fy3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wrote: >> From: Zhang Yi >> >> Change since v2: >> - Modify the sysfs interfaces according to the kernel implementation. >> - Determine whether the kernel supports it by directly checking the >> existence of the sysfs interface, instead of using device_requries(). >> - Drop _short_dev() helper and directly use _real_dev() to acquire dm >> path. >> - Check the return value of setup_test_device(). >> - Fix the '"make check'" errors. >> >> >> The Linux kernel (since version 6.17)[1] supports FALLOC_FL_WRITE_ZEROES >> in fallocate(2) and add max_{hw|user}_wzeroes_unmap_sectors parameters >> to the block device queue limit. These tests test those block device >> unmap write zeroes sysfs interface >> >> /sys/block//queue/write_zeroes_max_bytes >> /sys/block//queue/write_zeroes_unmap_max_hw_bytes >> >> with various SCSI/NVMe/device-mapper devices. >> >> The value of /sys/block//queue/write_zeroes_unmap_max_hw_bytes should be >> equal to a nonzero value of /sys/block//queue/write_zeroes_max_bytes if >> the block device supports the unmap write zeroes command; otherwise, it >> should return 0. We can also disable unmap write zeroes command by >> setting /sys/block//queue/write_zeroes_max_bytes to 0. >> >> - scsi/010 test SCSI devices. >> - dm/003 test device mapper stacked devices. >> - nvme/065 test NVMe devices. >> >> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=278c7d9b5e0c > > I applied this v2 series. Of note is that I amended the 2nd and 3rd patches to > fix the shellcheck warnings below. Anyway, thanks for the patches! > > $ make check > shellcheck -x -e SC2119 -f gcc check common/* \ > tests/*/rc tests/*/[0-9]*[0-9] src/*.sh > common/rc:679:7: note: Double quote to prevent globbing and word splitting. [SC2086] > tests/nvme/065:44:7: warning: Quote this to prevent word splitting. [SC2046] > tests/nvme/065:44:7: note: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'. [SC2005] > make: *** [Makefile:21: check] Error 1 Sorry for missing these warnings, and thank you for fixing them! :-) Thanks. Yi.