Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2162817ioo; Mon, 23 May 2022 11:34:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkeotP2FKnTL4Bhixlh8EBH5A8FB3CwHEZHTrc4DDVPHhGBHofsGKlY+PKyHNzo6P9jGLP X-Received: by 2002:a63:e047:0:b0:3c6:bf87:3ab3 with SMTP id n7-20020a63e047000000b003c6bf873ab3mr20803576pgj.373.1653330884068; Mon, 23 May 2022 11:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653330884; cv=none; d=google.com; s=arc-20160816; b=BCFlGPhgTfi1DJR2n9cL+hpitHQxqi7YNkKRh3x+iWj4ByfMgpVOtB/Nl+fwz/eRGp 4Af4p8TibpNBm+hZFBFWxZ4Foeyy35SG+E/ggmirLfksMThCd1GP/qzXQBcYWo5FIRJG NwECut6UBpVNk+DOxIDcfBc3zJ7wvb3mmjcs9vtvftqzSURkXkzlU8LAt5R3HSit2AAI MXyEgjElcuhtw5mD8VBnZAgX2HMH4sob+oz4Rizg08+WXPGKtdCL/q5+Fiv4T01QsL9D W3iak4ky5Y4rH9u2vxyS9VHKp/bD6coxBvUhLhcbRRFjCcEJ1iE36Jdx/gmOXfOYl1kN Is3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kdOaPNqdKiUqGPqTepXude0v1LHBppL38xhTNFAbyUE=; b=DkEGM8dQ+7jD3XfnmQA7cGnKL1phSLWx9eeuH6ad590JKCPeTEHgqVQl8fXIcRN4Zv wHqYdyqTtbmcJ80vc9YA1TsKgiJGGCu7p/m5s2iPsUjY5iPUk79cxH+UJPBDoeJllShc 8aOUJcT/cd4NSGt3c5JvUqM7nIEWGPDztz7bg/40QfX63iBUCGJztiO13vlE2TJnSCXZ P65dTIdZWuXw3miTpw+4t7ZlKxFZnHirNkXmHCVzggT9PB2GNUqWc83eHpV19VkW2z9E +y9sklYyzCToE+/rhMeIrvOAvPUVv20FPDA/bHd+XqZ9MppfbXRqmiF+NUBLEwfRgsPM 8oAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crudebyte.com header.s=kylie header.b=JFgRBwGv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=crudebyte.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l8-20020a170902f68800b0016224867873si5855565plg.477.2022.05.23.11.34.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 11:34:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@crudebyte.com header.s=kylie header.b=JFgRBwGv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=crudebyte.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DC5571A44A5; Mon, 23 May 2022 11:33:11 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240395AbiEWS2O (ORCPT + 99 others); Mon, 23 May 2022 14:28:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245571AbiEWS1K (ORCPT ); Mon, 23 May 2022 14:27:10 -0400 Received: from kylie.crudebyte.com (kylie.crudebyte.com [5.189.157.229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0780DDE302; Mon, 23 May 2022 11:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=kylie; h=Content-Type:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Content-ID:Content-Description; bh=kdOaPNqdKiUqGPqTepXude0v1LHBppL38xhTNFAbyUE=; b=JFgRBwGvqStc/xVkxZN1fSAgNI eoeei7L1fZ2sul7FXSHr1xAG5XHoKLc3P9YsQeH4W3SZhO0xWCXJJOiXyyTGCf3z5cowiATentBeT ndpFHvaIAP4qcSLaZkRigQWE++Wtc/C8eeT2fsVxJhOvjo3FmLSR0Tqxa4G3wiqJra0T9kmtwJPhc OVXC8q1IGfcerbwhca97OkTFuK7igLWk6048kz8aKrbjn+zSir21oG/aUxa85ZBdgpspT9nzUlFQc of+YJ+muE3Kc2v8OZClQotwRyVp6Mw4Ub4D0pmOWzj1TTh2iwLSUctqH1MJwIE7KnVkHOY8jI+PeI UzGWzXO7Tune+mjnH0oxIRuOLqr5y93m2iB6KPrNyLzneTJelcJRl4D4HqGK8az4isVKT4vg47tbq 7zKwrZl6gi5zDkCr4lsx0rOEDgRrXFspjFDKRScxA8A06lR3G1pdjaTHMm0oB//byzf0A+oWkptnO MVePdl1LLPVNcPMiQmfUh99FYyXoiuAfh8EDMvm949esGEGCWFRM194LlPYx61A7Xuai+MOu7Uc1s Y2Rr94yywbsz5ugOX85CeUvUE/ZBOToXlAPjFJfD2ajRCqSUtOTofTv/JYvRcSxVIhrGSUCG+Ysr1 hsDCvgiT3HHzNQpIXMO9ytusaKgOYCRzFwgQrTXME=; From: Christian Schoenebeck To: qemu-devel@nongnu.org Cc: Latchesar Ionkov , Eric Van Hensbergen , linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, Greg Kurz , Keno Fischer , Michael Roitzsch , Will Cohen , netdev@vger.kernel.org, v9fs-developer@lists.sourceforge.net, Dominique Martinet Subject: Re: [RFC PATCH] 9p: case-insensitive host filesystems Date: Mon, 23 May 2022 19:59:55 +0200 Message-ID: <6485122.aT25ngTQys@silver> In-Reply-To: References: <1757498.AyhHxzoH2B@silver> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Freitag, 22. April 2022 21:57:40 CEST Dominique Martinet wrote: > Christian Schoenebeck wrote on Fri, Apr 22, 2022 at 08:02:46PM +0200: > > So maybe it's better to handle case-insensitivity entirely on client side? > > I've read that some generic "case fold" code has landed in the Linux > > kernel > > recently that might do the trick? > > I haven't tried, but settings S_CASEFOLD on every inodes i_flags might do > what you want client-side. > That's easy enough to test and could be a mount option I just made a quick test using: diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 08f48b70a741..5d8e77daed53 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -257,6 +257,7 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses, inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); inode->i_mapping->a_ops = &v9fs_addr_operations; inode->i_private = NULL; + inode->i_flags |= S_CASEFOLD; switch (mode & S_IFMT) { case S_IFIFO: Unfortunately that did not help much. I still get EEXIST error e.g. when trying 'ln -s foo FOO'. I am not sure though whether there would be more code places to touch or whether that's even the expected behaviour with S_CASEFOLD for some reason. > Even with that it's possible to do a direct open without readdir first > if one knows the path and I that would only be case-insensitive if the > backing server is case insensitive though, so just setting the option > and expecting it to work all the time might be a little bit > optimistic... I believe guess that should be an optimization at best. > > Ideally the server should tell the client they are casefolded somehow, > but 9p doesn't have any capability/mount time negotiation besides msize > so that's difficult with the current protocol.