From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 5A40C2D063A for ; Tue, 2 Dec 2025 22:12:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764713563; cv=none; b=dGyNVd1YnFD5tjUqRDCsTW+9auxr4FVp+k494aLHqzpyKdB2f0nqjjqr6I03MAkyR+9fJ2i0xh4iLZysJz0O8P+VtNs2+7ARZAU7tVIIKLdxQm8NpYZyhJJx/WCQr9xFENa9+Ej9bqfRVTA03OtguPtznr/4T4E8UStV+GRGLTs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764713563; c=relaxed/simple; bh=DFk6jkyVaJz5NFepFvphO0aBbU2Yqr0IduPDe5gjTNY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TvrtohMdlWGQKqAKexhTjfiCBsKefgz33o+Ci3o70jUoiUYIfzjuXHGpu1zP0K0pY8HCmUSEOrHN2Vd96yi8fv22nj+U3MrQnnGAi9qtde0j5lKztAWwQYH5UYDQ0yoU4RQRtRhMgnA/pW1vrnsev4y729zABFbunEOYdQ2nfjU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=W6KXZfCD; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=FDZTYanC; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="W6KXZfCD"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="FDZTYanC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764713561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5HR6Gpebm8idLOLOm3Ct3v+B3+RBobPQirAADkyH+HU=; b=W6KXZfCDzd8MhPn7I9uhkdWzLKdenwaHZdc0uBVdINrw8cs7GkIyYq2ASn2RKGZw61m/kT 8KunMVcNkszPC2HioGjn2Fr2+3xBBwid9R7wZQgF5p1cUPzh7muMlGKFUhU7qPfry246AU RZwTPsQ0GxT7N6rVPxznQrtdp4gQ08s= Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-8mLdNr8IPO-UjXvLeqeN2g-1; Tue, 02 Dec 2025 17:12:39 -0500 X-MC-Unique: 8mLdNr8IPO-UjXvLeqeN2g-1 X-Mimecast-MFC-AGG-ID: 8mLdNr8IPO-UjXvLeqeN2g_1764713558 Received: by mail-oi1-f200.google.com with SMTP id 5614622812f47-453109b60a5so2179849b6e.0 for ; Tue, 02 Dec 2025 14:12:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1764713558; x=1765318358; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=5HR6Gpebm8idLOLOm3Ct3v+B3+RBobPQirAADkyH+HU=; b=FDZTYanCDdrTcrGa/dubK+uBTa0VYusXpfjzyXRsknAzsMxL5GqcIpqMUrrcrhyzZE XwtTYfDgKZy1RNDGVziJY/1fx/3NVba2IgJnS/nj9Ynw8qqViXuUWoUqe3Ws11sMJDg/ F8uZLQAwcfn4twwr2tQCxPZCn9t0bhj+59UX2c3dOodCsRROsRIef5nHeyIoCN/nRp/V Y1PIOefTbuyeJsyIUhsn2KVa+8XRgfvPeD1vHL8zNxThcFr/BxAv5kR8vl0n9YOBWJL3 5BQOkICvQ7JERBLiaCf8Cd4qee+tzjSUUJpPNNg/ePjW4ckbiOawBRFcKOrRnHallr0A 4QOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764713558; x=1765318358; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5HR6Gpebm8idLOLOm3Ct3v+B3+RBobPQirAADkyH+HU=; b=rlXcRxefeAuv2JV52wVszSganfXfBDSrtlXB+X0JTnugXKeLN/lu639hAHw2UZ5kNx uwsoRKQIDqQOKbyghuPO9HM9/MMOMYGf6EoM6+rqfSsmncg8TxCvX/DA5Ms4SudRZDPR 7zomozAd2nLzNbu1ruiCIMp2j2/Q3F7nSnKIdJljiSmG067n2/CS32EWkmMzlnwR8Yk7 LQujZWB4N0jUh7qfhJv8U7a67WaHv26Ux58/kHNlYJq1INXLllmt30sMyyRtiCGNw1HS 5xCSf7XVQXqpaSlhjLO9+HOf89Kcpr9dlgVGinzB5oRCFSE//0SyKl0rc+bBwYSlyrx/ nm2w== X-Forwarded-Encrypted: i=1; AJvYcCVj9Q2yfuOCkAX5AsXgyCbRjqfkZPIlLHoaeUd0sjIF1l8Aj3utOmU9qTPomVHYDQ8L9Z5HRKfSwWS54vQ=@vger.kernel.org X-Gm-Message-State: AOJu0Ywn/tiGXY64tAYQuoJd57ut+XsBFD9UFJ6avkb8Cf9oGxMJTEgg r1niL3Vp+Ltz3+kzKmph4pzh4JCdsc1Iq/j78tt7DLZXAJWkps9TYtzQ/pFJoFtKbQnuabGJbq7 xGsQLPmoPMZpueS/oIUrUMiT4Kc1zn1v2OJXZHuAqW6tmFXWQ9u3er2ZqZaXUBruWdQ== X-Gm-Gg: ASbGncvZqc847XmnhlZ8RzUyeq9zkljbGHIkpYHWJKxNqCrL6zaIcb1GkTUGo3v+yZa HTYgsmrbxxdpiUvNk7gCTimpKIAOK0++Z+ZSCVDAccCYUPnmxRSn9SNhu9rH1/NYg0hrCZW4907 ur9Nv1pic93zQxoRqetG6A7TlVXUgU28EFtNDN4x9H7QNTSP2g2Y4zah3VcF1EliQmVDQppjqo+ XYkIEUlvyqmobG9XfK44lABOPjZLwZijmn1Pps/zK/5gEPVTuV+N6Gbnc4j0q0o+20idMWVM/jj NDAhkpVbXN3+PayLxaOjdH8iX+f1Arx1AQWM6LfoLpem/cbONFXaeRy1ruzXN/wJuiS76ucYmHs Pe9DO3GNh3y5dre+M/UBIjrLCY7XTbW4eZJdHeB0KWrumt97vNb8= X-Received: by 2002:a05:6808:1a19:b0:44d:af21:bf34 with SMTP id 5614622812f47-4511294e751mr22168649b6e.2.1764713558420; Tue, 02 Dec 2025 14:12:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEz/KymsEP/xs/W+jYnCoHFuQlJpYUDhkDP/FaJqgHwkUGYC7jbKunrQ9FAPvoBzltjcKzjZg== X-Received: by 2002:a05:6808:1a19:b0:44d:af21:bf34 with SMTP id 5614622812f47-4511294e751mr22168636b6e.2.1764713558085; Tue, 02 Dec 2025 14:12:38 -0800 (PST) Received: from [10.0.0.82] (97-127-77-149.mpls.qwest.net. [97.127.77.149]) by smtp.gmail.com with ESMTPSA id 5614622812f47-453169fa988sm6331014b6e.9.2025.12.02.14.12.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Dec 2025 14:12:37 -0800 (PST) Message-ID: <13d4a021-908e-4dff-874d-d4cbdcdd71d4@redhat.com> Date: Tue, 2 Dec 2025 16:12:36 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V3 4/4] 9p: convert to the new mount API To: Dominique Martinet Cc: Remi Pommarel , v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, ericvh@kernel.org, lucho@ionkov.net, linux_oss@crudebyte.com, eadavis@qq.com References: <20251010214222.1347785-1-sandeen@redhat.com> <20251010214222.1347785-5-sandeen@redhat.com> Content-Language: en-US From: Eric Sandeen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/1/25 7:04 PM, Dominique Martinet wrote: > Eric Sandeen wrote on Mon, Dec 01, 2025 at 04:36:58PM -0600: >> I suppose it would be a terrible hack to just extend the enum to include >> hexadecimal "strings" like this, right.... ;) > > Yeah, that might work for all intent and purposes but we'll get someone > who mounted with cache=0x3 next... :) > >> I think the right approach would be to just reinstate get_cache_mode() to >> do open-coded parsing as before, and get rid of the enum for the cache >> option. > > This sounds good to me! > >> Would you like me to send a patch 5/4, or an updated 4/4 to implement this, >> or would you rather do it yourself if you think you have a better chance >> of getting it right than I do? > > No strong feeling either way but I think a 5/4 would be better to > clarify why we do this -- I could probably do it as well but I'd > definietly appreciate if you could do it (and I'll just have to make > time to test at the end!) Working on this, but something that confuses me about the current (not for-next) code: If I mount with "cache=loose" I see this in /proc/mounts: 127.0.0.1 /mnt 9p rw,relatime,uname=fsgqa,aname=/tmp/9,cache=f,access=user,trans=tcp 0 0 note the "cache=f" thanks to show_options printing "cache=%x" "mount -o cache=f" is rejected, though, because "f" is not a parseable number. Shouldn't it be printing "cache=0xf" instead of "cache=f?" (for some reason, though, in my test "remount -o,ro" does still work even with "cache=f" in /proc/mounts but that seems to be a side effect of mount.9p trying to use the new mount API when it shouldn't, or ...???) I'll send my fix-up patch with a (maybe?) extra bugfix of printing "cache=0x%x" in show_options, and you can see what you think... it could be moved into a pure bugfix patch first if you agree. thanks, -Eric