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 B060821CC60 for ; Wed, 3 Dec 2025 01:09:48 +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=1764724190; cv=none; b=SY4okUJ1/1mFjQ1PkVqO6SASfwfLebuXY14gVXKuDl7/z8ifyQH8E+zRW3rMKbINaHzWrNhNS/edjKxiobAICU4Io0Vd5PirOsavJreIPvHM+QTEGoOKgtLLwrz2nZn9FkerjmvAiBlKJrjovSvs4ghju/JlYCjwr9E02L2kCxM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764724190; c=relaxed/simple; bh=6d9MLhbuGhImXKQsbqVvBDxpx5TNDGot34v3meko/w0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=M+PBRi0QVW327lxHK+Ezvt1xhOURHqK8MQJ7eVFyu1rxhVPbn76ja4szPaE4wzER2HSSqnXiL+X0NFy23CZoM6zWzU5WZkO04fTGBEGRCZQREriVo6KOzi6qYkGjj0YIDj/v1hjlUj4OYAMAc6chjYCU4CmEUZ6T30eTVZ0oyQk= 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=JMK+KR64; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=nIKzMiDT; 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="JMK+KR64"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="nIKzMiDT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764724187; 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=kFZSJbUMoFREDOMf4hNQovtb4fH0ilmA926PCOmpAo0=; b=JMK+KR64Vb2aqyy6RgoOULOI4qyUB+M9SiznQhtIfH0uihdezvN9XhGHuWlvR2xdjy2uPi weaIz0cJZiR6ZVvGoEzrjzrMwaZxClTzTqyVYnlrvrZ/K+0A905kOhtI+qlQtpOxknoJ2Q OQSOV7W5NjcWJdHRIGYzScLChYGQJKg= Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-447-_frIrDcDN426BTnifKx4ug-1; Tue, 02 Dec 2025 20:09:45 -0500 X-MC-Unique: _frIrDcDN426BTnifKx4ug-1 X-Mimecast-MFC-AGG-ID: _frIrDcDN426BTnifKx4ug_1764724185 Received: by mail-ot1-f69.google.com with SMTP id 46e09a7af769-7c766d79592so12676105a34.0 for ; Tue, 02 Dec 2025 17:09:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1764724185; x=1765328985; 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=kFZSJbUMoFREDOMf4hNQovtb4fH0ilmA926PCOmpAo0=; b=nIKzMiDTYTRCQ4i+WVMAO8hO/8R/+QgC48uLhbHwQrlUQqLE3T7ERgn2xcXcbj+ebC dqvxRyCef/6gP8xUD+L1x4sFZlvYHYnNKzrh0Pihq+LMyOPS3XZBohQsTJFtcyVM5o0H q8owlIQvEsPq2O3F96k8vhGHmbnR796vKqC3x5jdtD/9FkuYKYMp6SG68mzjtCC5hW/v uN4FOXKplyhPgVZdB1BcengjcDIiSUeG1WS7usn2SuGHHvmEQRWbCG4gJcPMPu2pfE3O yKxIh6pCX9OnJ8/N3DXDgEHC8qIFjHDMiyOagKtzXGxc6hEke9MWcuKJcm1taFoYBvkC jzqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764724185; x=1765328985; 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=kFZSJbUMoFREDOMf4hNQovtb4fH0ilmA926PCOmpAo0=; b=CM8owC+mlTLifR22RSDiXAoUk1sOkITpsTSpBlI5dNMAm4Ukpo2oizO/Lap3sIFngp ZjqXSa2Pnhdy+sR394Pbm1wfdVQi822H6hYb0Qz8YgEtF4P/Se9ZAnY5+xi9muHAyET0 +arpJoz3knRxMEQqcRanfPuaXlXhToRgCAW95leuBRBdH9tj5Q0HebIWAyCnpplONsD4 N9VkFlTdLkvBT98TCtlD66XZrFT/WdAitNS8OQ1Hkjh/2Q/mCYaOAXEVUs4MXN9UZ63v a9/GQcimGhuputd5GAlKBXHWo7tDioVXm2xGdku6gdmhLDg95eZDDUjj0AjQWOoVBnXb Q1bQ== X-Forwarded-Encrypted: i=1; AJvYcCUtgR7vo2CcFxdFn4CAPSNV3crfHgcSknAApuwqWtTTr37JGljWaL37+in5OgqVR+mERcSD8Cn2ZSF+mn4=@vger.kernel.org X-Gm-Message-State: AOJu0Yz1mGRjg75KVyGqXJglGWMphlCNvr1RfKPLRQIsu3DcJC2kSrjc 7/zfJlsImU4HEf5622SmhkPojIzJS44Yoi62akJwKVKZ/rVdLvfWpzKBYZezoMExyBr6DgkNvEl IVyqMOYXOyguj66QxW+NI1SrjPU/XNOVaaCoF/vQS95tPbf9QDGsIa4pmB/hJADauPA== X-Gm-Gg: ASbGncudDqQJyyV5Z8xDuHLYSNrDk88V3wvFZYqEteaonfB9dciUW2PgtEnVaxhic/n DbeEOo22YsDdkSMcyK6GYpmpgWoBuxqwHz+zcN8pqIQvbXzkZTRZNavr+bmBJ51P6NVR7S4BQ+6 b2UB5EU+4KfT23yg+P4Pd0eedJoNTYaNygYgbFVgpv/b76juwOu/PDQpRhwHK1e/prUMsuGla5E iv4zMj70LL1Pz4ObOscJkBTMwEqfwSqEuHrUtjQHOQrkQTM6IcloSgmAItiSZMoRKUrUkopG2FO CyLkZ9Fjl2Kip6HcDZ77ezFKfB6nWg8vYJGRmq0DaLp45z0B3clxgRVGL/g4vaS2XlSpl1ji/6R Z+wUVapwneDthwbuQDD0EeNtHhR+e0ZIGPem7tI24xPjE2heNl5o= X-Received: by 2002:a05:6808:30a4:b0:451:4da2:47d1 with SMTP id 5614622812f47-4536e599060mr212332b6e.45.1764724184830; Tue, 02 Dec 2025 17:09:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IGX66IY0w4jVRYgGZS3OqlgpFq++sZ6b4dlPs/qOP4GCvzDfdGtaSRW5nlyyfoamYMaSZ+eFw== X-Received: by 2002:a05:6808:30a4:b0:451:4da2:47d1 with SMTP id 5614622812f47-4536e599060mr212317b6e.45.1764724184426; Tue, 02 Dec 2025 17:09:44 -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-453169f6f67sm6648597b6e.6.2025.12.02.17.09.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Dec 2025 17:09:44 -0800 (PST) Message-ID: Date: Tue, 2 Dec 2025 19:09:42 -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 5/4] 9p: fix cache option printing in v9fs_show_options To: Al Viro Cc: v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, ericvh@kernel.org, lucho@ionkov.net, asmadeus@codewreck.org, linux_oss@crudebyte.com, eadavis@qq.com, Remi Pommarel References: <20251010214222.1347785-1-sandeen@redhat.com> <20251010214222.1347785-5-sandeen@redhat.com> <54b93378-dcf1-4b04-922d-c8b4393da299@redhat.com> <20251202231352.GF1712166@ZenIV> Content-Language: en-US From: Eric Sandeen In-Reply-To: <20251202231352.GF1712166@ZenIV> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/2/25 5:13 PM, Al Viro wrote: > On Tue, Dec 02, 2025 at 04:30:53PM -0600, Eric Sandeen wrote: >> commit 4eb3117888a92 changed the cache= option to accept either string >> shortcuts or bitfield values. It also changed /proc/mounts to emit the >> option as the hexadecimal numeric value rather than the shortcut string. >> >> However, by printing "cache=%x" without the leading 0x, shortcuts such >> as "cache=loose" will emit "cache=f" and 'f' is not a string that is >> parseable by kstrtoint(), so remounting may fail if a remount with >> "cache=f" is attempted. >> >> Fix this by adding the 0x prefix to the hexadecimal value shown in >> /proc/mounts. >> >> Fixes: 4eb3117888a92 ("fs/9p: Rework cache modes and add new options to Documentation") >> Signed-off-by: Eric Sandeen >> --- >> >> diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c >> index 05fc2ba3c5d4..d684cb406ed6 100644 >> --- a/fs/9p/v9fs.c >> +++ b/fs/9p/v9fs.c >> @@ -148,7 +148,7 @@ int v9fs_show_options(struct seq_file *m, struct dentry *root) >> if (v9ses->nodev) >> seq_puts(m, ",nodevmap"); >> if (v9ses->cache) >> - seq_printf(m, ",cache=%x", v9ses->cache); >> + seq_printf(m, ",cache=0x%x", v9ses->cache); > > What's wrong with "cache=%#x"? > Nothing, presumably - I did not know this existed TBH. (looks like that usage is about 1/10 of 0x%x currently) -Eric