Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp15771315ybl; Tue, 31 Dec 2019 14:57:58 -0800 (PST) X-Google-Smtp-Source: APXvYqzpMfWmNdC90a7N89LeYKBT14ZVlPsAHZkQjKS2M4SdovbdsXstI/NDdNtLZkO8lenTw+yg X-Received: by 2002:a17:906:e86:: with SMTP id p6mr78297061ejf.299.1577833078301; Tue, 31 Dec 2019 14:57:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577833078; cv=none; d=google.com; s=arc-20160816; b=Vn3qHWhJezPUig5wbl1QcEgUdfAp2ovuqqL5ao0hT9JAB803GSo92PpGGrMBWw9ZF7 dOi2cqvUcnHRdKyUFe2WZTQxCnYL+t74RV4cIvhP+4EEuQ3aMz8fBlbGAhHZn+qASHHv eTrHVX+WEOHnj+pUSf4d4XjhGwl6H8LZygWgLTTtrzemEcnIZwENdGSSEgm6ukQemq0r IYWghy/tRNiZSHu3+NpTCjiQTVCLPM3W6beTr5dJdS4HMXKrifB0/yxcY52gV4FLQ9gO CdT1/hYOABkmUiF2UY1wn8L9VlQXX8UbAq5fI76uNIJ5BziU5kcZOd3X2ECv5NSSfgim CFVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=slmh9bW+4V4Ot0eIs6GceXv6tZVqhiaH5L3lUPXogb8=; b=Qo9SOdnCQQio2o6oQ/tI3EAY1WVfiyfgx9n+FxKXeXcuABRxbXPeZ7CU+rnO5JH4Wg F3cWw9ghZ6KmvUHVz4VZaxSYUwV7S0FKruODDC0qRyljpvXy0/cPYYSBFKEAiDYLuRsG 2njz+OORxMaa4n2Gn+RNXdSHjVzhiuPNTrYImxgRaiu5Y0Z20SZH1d0hEqzG5Q81L1GC m5DYrA0oUW/2DIAdjukh7GIDsOzcumWNl7BVyR2if7Y6UlazeiH9WNR4rdzshCkM3TWH aQ+25tGRfutymUds++4Vx4xksy8daH3XBlnnvt+jQWF4yIYi+8yDs14kewKCkNLtqdrR IFHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QERVFuI1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g14si33418511ejo.75.2019.12.31.14.57.20; Tue, 31 Dec 2019 14:57:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QERVFuI1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727118AbfLaWy1 (ORCPT + 99 others); Tue, 31 Dec 2019 17:54:27 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:25251 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727054AbfLaWy0 (ORCPT ); Tue, 31 Dec 2019 17:54:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1577832865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=slmh9bW+4V4Ot0eIs6GceXv6tZVqhiaH5L3lUPXogb8=; b=QERVFuI1GnIfl0T8YJovza3lKcxTI+kD+rVqA7JEyDl9EGIyGqXNtBwXfwaYwwyzpQz3PV 5koAnTrR3g8qZizC/657rx+YS248Nlxf/+lDldoqgpUWidqTgu9uUpBXmAPwYYIz3A1kLm K/hmzJBvnkaFDvA0/WPtceLo5TzgWzM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-NwmcAXVlPQSfYh0kDQn1ZQ-1; Tue, 31 Dec 2019 17:54:22 -0500 X-MC-Unique: NwmcAXVlPQSfYh0kDQn1ZQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7AE21107ACC5; Tue, 31 Dec 2019 22:54:20 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8863960579; Tue, 31 Dec 2019 22:54:19 +0000 (UTC) Subject: Re: FS_IOC_GETFSLABEL and FS_IOC_SETFSLABEL To: =?UTF-8?Q?Pali_Roh=c3=a1r?= , Andreas Dilger , David Sterba , "Darrick J. Wong" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20191228143651.bjb4sjirn2q3xup4@pali> From: Eric Sandeen Message-ID: <517472d1-c686-2f18-4e0b-000cda7e88c7@redhat.com> Date: Tue, 31 Dec 2019 16:54:18 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20191228143651.bjb4sjirn2q3xup4@pali> Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/28/19 6:36 AM, Pali Roh=C3=A1r wrote: > Hello! >=20 > I see that you have introduced in commit 62750d0 two new IOCTLs for > filesyetems: FS_IOC_GETFSLABEL and FS_IOC_SETFSLABEL. >=20 > I would like to ask, are these two new ioctls mean to be generic way fo= r > userspace to get or set fs label independently of which filesystem is > used? Or are they only for btrfs? The reason it was lifted out of btrfs to the vfs is so that other filesys= tems can use the same interface. However, it is up to each filesystem to impl= ement it (and to interpret what's been written to or read from disk.) > Because I was not able to find any documentation for it, what is format > of passed buffer... null-term string? fixed-length? and in which > encoding? utf-8? latin1? utf-16? or filesystem dependent? It simply copies the bits from the memory location you pass in, it knows nothing of encodings. For the most part it's up to the filesystem's own utilities to do any interpretation of the resulting bits on disk, null-terminating maximal-le= ngth label strings, etc. -Eric