Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2904727yba; Mon, 6 May 2019 13:32:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzqZmglIhrbfTxC1yRVEr1Yiagu5FjWoAhRzF1gZrqmrtrd3DhIBrCSS4HFRyAWpb+F8fQG X-Received: by 2002:a63:778b:: with SMTP id s133mr34578928pgc.198.1557174773791; Mon, 06 May 2019 13:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557174773; cv=none; d=google.com; s=arc-20160816; b=GqQ61S6KJKtdopqIkpC62hHMh9SSYoyKHMN5yMLUnRkUUj+Re/YDOfu0MF3bYQMAT3 nuLWqehdjsgnYbLA/aI1bzvoqtv4lhpOlEhoBMqn8qDpwuuOcHmhl3Ig0h54yuDppaGP gxIy/8Ml9pvkQ+ktnU04OpL1neH8yBUSpsDKEESkDeROkIjF1a3uQwhrTWUnUBNmXG4X dGKa4JgKWxlFlnFdU2MPMmzaisar4Q+C2JMN+AzA7yoUU7PAFFPW+NgGEqMiPsPBNqTb 9K0+nuYmpFmzyPmeJS6QZKrRXw5r/4GevTKvyWhAzc36moxXf1oU39Vj7VBT/F3zF3yB GaEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:organization:subject:cc:to:from; bh=t4+d/A7NYCxDXR0rc2ObDvQSb/c63DOovEdpXwpwyCE=; b=FuFY+twIHtun+lgdX/i3JmzO6BbXYeJGitEo7ESvsb42LS5VumDmhJWQB68+HOpkkg juBmHhWlKXavmJIwK3nQuf69vkFNqea1KLq/8VjU4Jz/fI0lOQ37VkCrwGlzLauoCpFy tvx8LNhDpvjv47vYOt5s4Krznfl0YWzCQdw7F36kIw4Sfk01XapD9pLm8zf9BwuWwdOc t68ZIx+GpWKuvfiY6RKxgGwPbnKMSOI0Vnd8sIs4JprpatQPZxcYnYcuNpamSRxs4eXr 7r4PN/koMlWSvqN+lb4sgkguZreIKAXM66cNVZQZRGeLlmrIlsT6yK+yH0kqDF4KjWam tUgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d40si17684608pla.87.2019.05.06.13.32.30; Mon, 06 May 2019 13:32:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726304AbfEFUc2 (ORCPT + 99 others); Mon, 6 May 2019 16:32:28 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:33344 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726201AbfEFUc2 (ORCPT ); Mon, 6 May 2019 16:32:28 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 55CFF26398A From: Gabriel Krisman Bertazi To: "Theodore Ts'o" Cc: fstests@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [PATCH xfstests 1/2] common/casefold: Add infrastructure to test filename casefold feature Organization: Collabora References: <20190506185941.10570-1-krisman@collabora.com> <20190506200325.GA3985@mit.edu> Date: Mon, 06 May 2019 16:32:23 -0400 In-Reply-To: <20190506200325.GA3985@mit.edu> (Theodore Ts'o's message of "Mon, 6 May 2019 16:03:25 -0400") Message-ID: <875zqn1fzc.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org "Theodore Ts'o" writes: > On Mon, May 06, 2019 at 02:59:40PM -0400, Gabriel Krisman Bertazi wrote: >> +_require_test_casefold_feature () { >> + _has_casefold_feature $TEST_DEV || \ >> + _notrun "Feature casefold required for this test" >> +} >> +_require_scratch_casefold_feature () { >> + _has_casefold_feature $SCRATCH_DEV || \ >> + _notrun "Feature casefold required for this test" >> +} > > I've just pushed out a commit to ext4.git tree which will cause > /sys/fs/ext4/features/casefold will exist iff CONFIG_UNICODE is > present. This will allow the test to check whether or not the kernel > version and configuration will support the casefold feature. > > Could you add a check for this flag if the file system type is ext4? Hello Ted, I will follow up with this change on a v2. > A file system independent way of doing this would be to create a test > file system on the test file system, calling "chattr +F" on the > directory. If it fails, then either the file system doesn't support > it or the chattr program is too old and doesn't support casefold. If > the chattr +F succeeds, then the test should call lsattr -d on the > directory and make sure the request to set casefold flag was actually > honored; some file systems will simply fail to set flags that they > don't support, so we do need to do a SETFLAGS followed by a GETFLAGS > to be sure that it was supported. > Speaking of file system independent casefold, I believe that it will > be likely that the casefold feature will be supported by f2fs in the > fullness of time. If that happens, how to test for the file system > feature will be different (since dumpe2fs is ext4-specific), but I > would expect "chattr +F" interface to be the same between ext4 and > f2fs. I planned to add the per-filesystem test inside common/casefold. Not sure how it would be done for f2fs, but i don't think we'd have a unified interface other than SETFLAGS followed by GETFLAGS to test this. I think I could make this method the fallback. > > This might mean that we should add casefold tests to either generic/ > or shared/ instead of ext4/ --- I think it would be shared since at > least initially it would only be ext4 and f2fs, and I haven't seen any > indication than other file systems would be interested in adding > casefold support. Or we can move the casefold tests later from ext4/ > to shared/ once the f2fs support materializes. Last thing I did before submitting this series was moving from generic/ to ext4/. I plan to move it back into generic/ or shared/ once another filesystem uses it. I didn't have a chance to discuss with xfs folks yet, but I spoke to Chris Mason and I plan to propose this feature for xfs and btrfs soon. -- Gabriel Krisman Bertazi