Received: by 10.223.185.116 with SMTP id b49csp1037757wrg; Wed, 21 Feb 2018 11:00:31 -0800 (PST) X-Google-Smtp-Source: AH8x227jvFEQJJ8AEhPKK3mlbqlVXLJdlE++LfOgxz3swPkLiBpDLdqXucWF1SitWoP1cuwPx7vh X-Received: by 2002:a17:902:26:: with SMTP id 35-v6mr4062831pla.42.1519239631067; Wed, 21 Feb 2018 11:00:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519239631; cv=none; d=google.com; s=arc-20160816; b=mz+UEVFhwFYPSw0VIIjAF0lnQMkapUbI8XGekkTi1peOJaO30Plj6V4Uy63TwKI87n efm5QE0aqIdqUUq28KMpBN+hvbLjIZwXrDEVVvWMY3AV2+y9SElPpnmk6Kisc99BS0XS za0oQGFtFodd/fUJJL62swhEAnwj1KsY/vUMHuIlkUEQmNDapjAm+IxHstDat6n1IOFu 01dVuio6FXf74AQsHUOwLmiZmXj/am3Ofpe+T+OCdhdosRe4FJ3/CmB92AkXO4ghwUKD GE1IUR51n1Ib9bSIVBUf4N7C5pF24L5z2D74PALQ9LGbIiV/fVmRn4YJny4ukra+Z2Su gzKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Muf93tsKc0/a8SBCjTPfJPwkuH3X6plZ5UKcDb/30Mo=; b=Jq4OJ5k+8naDAS9e3Hm5QnKrnkWsMR8UrgHmHs52nH6yofKA5NnxOXQI3mk22oi6B4 hWT2CKttCPOVWq8gEw8p9t0peHSAnGbdlilQxgaHdiQyhdx3YgPHsuULVF/xCw/AAOX1 8Xyi0rTlc3CuZO7CrqlfCZvqRN/uguSLkQOZ/HL8leN73SAxQcHAnCBSNBDCppF+Y+Jo QRRfM6PulCONuBSAevoRLz86j281jq84SGRwittnoCvyIwgsdVjT4Sb/wfFGSGHCTbnP kNhKipdSAs+GPwfCisR5dmahydsHK9OXXV2f/wY9mW0ckLycCv88F9cthZXGrsjgAUiV OHHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JudIFZr9; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b84si2064517pfj.183.2018.02.21.11.00.16; Wed, 21 Feb 2018 11:00:31 -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=@gmail.com header.s=20161025 header.b=JudIFZr9; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932604AbeBUQHt (ORCPT + 99 others); Wed, 21 Feb 2018 11:07:49 -0500 Received: from mail-io0-f170.google.com ([209.85.223.170]:45514 "EHLO mail-io0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932177AbeBUQHr (ORCPT ); Wed, 21 Feb 2018 11:07:47 -0500 Received: by mail-io0-f170.google.com with SMTP id m22so2636097iob.12; Wed, 21 Feb 2018 08:07:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Muf93tsKc0/a8SBCjTPfJPwkuH3X6plZ5UKcDb/30Mo=; b=JudIFZr9qi2ZEpeMPUJsq+9t2qOQhb/jmhVLq5b68anm1wxq+Bbj9GtPpnlqpTeZKL RFlQ9lJvfWBE+9gDT8xc4Z2J7USXQVIiC6cIXcse8uIJewFEJqXtYVS48jbxYxVc9jl+ dwTVbq0ArxvjObBcq2knlCKKngSWazoFJ8kKChXQki1BF1QfqGwwHyOMxl3uzX9GH8yo 4Plles0IpEdoWBKZMY9EGphhG7h/JYNozjvPLjAAqNhdJd/E4LYCH3MEUZc/vRz9j9vg 1z53RQ/c2gq54XDYLVg1U2jrmXWPye10F5Ms1VfDWs+o2NtyqQcIxaYhTF1eaKB6KP2e FooQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Muf93tsKc0/a8SBCjTPfJPwkuH3X6plZ5UKcDb/30Mo=; b=p3V4eSHMKIoSrO9OFHSh2eSoRwEKJb4wiFZ3WQaQ0CoMfdOh/Xuj3SMn3im7zhh+Zi 47+//wkdrgQSNC/CrqoF4hqbV4bkviDdgFavfHbm5dGdssD4z7k35Ea/fl9zOMkk31xO tpBqYD4bPlixYqBjZRiHvh1Iq0dlgUEQQ8pD4QwGTAIOkvUBIdGMiCh4VtkadISSWeGb yVlHzoTd7jUuXzGFPeRZSBiOkaLJhEIk9jkmJ7qx9hCyWJ8YmOZK00CnlshgnL7HuRZh YqYoz6rH6Jg3MkzPjiiH8LT0rr+TuYQRcgA9oz4dKq8du1mqcmCe8KEmZylZQz01TSLQ 80mQ== X-Gm-Message-State: APf1xPDR8HBEqzHaRfM1g0S9XTcCp+pzO6vHsOx3dGqWyOwnpmAHx0f/ fnalpy8I5Mif8NUpNH5wBr9B60wRelWq77MDdXo= X-Received: by 10.107.104.1 with SMTP id d1mr4704105ioc.119.1519229266307; Wed, 21 Feb 2018 08:07:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.133.108 with HTTP; Wed, 21 Feb 2018 08:07:45 -0800 (PST) In-Reply-To: <20180220090859.GA22737@mordor.localdomain> References: <20180220090859.GA22737@mordor.localdomain> From: Ilya Dryomov Date: Wed, 21 Feb 2018 17:07:45 +0100 Message-ID: Subject: Re: [PATCH] block: rbd: update sysfs interface To: Aishwarya Pant Cc: Sage Weil , Alex Elder , Ceph Development , linux-kernel@vger.kernel.org, Jonathan Corbet , Greg KH , Julia Lawall Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 20, 2018 at 10:08 AM, Aishwarya Pant wrote: > The existing sysfs interface has been updated to be in the same format > as described in Documentation/ABI/README. This will be useful for > scripting and tracking changes in the ABI. Attributes have been grouped > by functionality and/or the date on which they were added. > > There are a couple of more changes: > - The attributes have been annotated with file permissions RO/RW/WO. > - Added description of the bus attribute supported_features > > Signed-off-by: Aishwarya Pant > --- > Documentation/ABI/testing/sysfs-bus-rbd | 202 +++++++++++++++++++------------- > 1 file changed, 122 insertions(+), 80 deletions(-) > > diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd > index f208ac58d613..9549e9b0fcf8 100644 > --- a/Documentation/ABI/testing/sysfs-bus-rbd > +++ b/Documentation/ABI/testing/sysfs-bus-rbd > @@ -1,121 +1,163 @@ > -What: /sys/bus/rbd/ > -Date: November 2010 > +What: /sys/bus/rbd/add > +What: /sys/bus/rbd/remove Hi Aishwarya, No need to group "add" and "remove" together. Do them separate, like "add_single_major" and "remove_single_major". > +Date: Jan, 2012 > +KernelVersion: v3.10 I think "add" and "remove" go back to v2.6.37. > Contact: Yehuda Sadeh , > Sage Weil Remove Yehuda from the contact list here and everywhere else. > Description: > + add : (WO) Add rbd block device. > > -Being used for adding and removing rbd block devices. > + Usage: [] > > -Usage: [] > + $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add > > - $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add > + The snapshot name can be "-" or omitted to map the image > + read/write. A will be assigned for any registered block > + device. If snapshot is used, it will be mapped read-only. > > -The snapshot name can be "-" or omitted to map the image read/write. A > -will be assigned for any registered block device. If snapshot is used, it will > -be mapped read-only. > + remove: (WO) Remove rbd block device. > > -Usage: [force] > + Usage: [force] > > - $ echo 2 > /sys/bus/rbd/remove > + $ echo 2 > /sys/bus/rbd/remove > + > + Optional "force" argument which when passed will wait for > + running requests and then unmap the image. Requests sent to the > + driver after initiating the removal will be failed. (August > + 2016, since 4.9.) > > -Optional "force" argument which when passed will wait for running requests and > -then unmap the image. Requests sent to the driver after initiating the removal > -will be failed. (August 2016, since 4.9.) > > What: /sys/bus/rbd/add_single_major > -Date: December 2013 > -KernelVersion: 3.14 > -Contact: Sage Weil > -Description: Available only if rbd module is inserted with single_major > +Date: Dec, 2013 > +KernelVersion: v3.14 > +Contact: Yehuda Sadeh , > + Sage Weil > +Description: > + (WO) Available only if rbd module is inserted with single_major > parameter set to true. > - Usage is the same as for /sys/bus/rbd/add. If present, > + > + Usage is the same as for /sys/bus/rbd/add. If present, this > should be used instead of the latter: any attempts to use > - /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is > - available will fail for backwards compatibility reasons. > + /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is available > + will fail for backwards compatibility reasons. > + > > What: /sys/bus/rbd/remove_single_major > -Date: December 2013 > -KernelVersion: 3.14 > -Contact: Sage Weil > -Description: Available only if rbd module is inserted with single_major > +Date: Dec, 2013 > +KernelVersion: v3.14 > +Contact: Yehuda Sadeh , > + Sage Weil > +Description: > + (WO) Available only if rbd module is inserted with single_major > parameter set to true. > - Usage is the same as for /sys/bus/rbd/remove. If present, > + > + Usage is the same as for /sys/bus/rbd/remove. If present, this > should be used instead of the latter: any attempts to use > /sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is > available will fail for backwards compatibility reasons. > > -Entries under /sys/bus/rbd/devices// > --------------------------------------------- > - > -client_addr > - > - The ceph unique client entity_addr_t (address + nonce). > - The format is
:/: '1.2.3.4:1234/5678' or > - '[1:2:3:4:5:6:7:8]:1234/5678'. (August 2016, since 4.9.) > - > -client_id > - > - The ceph unique client id that was assigned for this specific session. > - > -cluster_fsid > - > - The ceph cluster UUID. (August 2016, since 4.9.) > - > -config_info > - > - The string written into /sys/bus/rbd/add{,_single_major}. (August > - 2016, since 4.9.) > - > -features > - > - A hexadecimal encoding of the feature bits for this image. > > -major > - > - The block device major number. > - > -minor > +What: /sys/bus/rbd/supported_features > +Date: Mar, 2017 > +KernelVersion: v4.11 > +Contact: Yehuda Sadeh , > + Sage Weil > +Description: > + (RO) Displays the features supported by the client software the client software implementation -> rbd module > + implementation so that userspace can generate meaningful error > + messages and spell out unsupported features that need to be > + disabled. > + > + > +What: /sys/bus/rbd/devices//size > +What: /sys/bus/rbd/devices//refresh > +What: /sys/bus/rbd/devices//current_snap > +What: /sys/bus/rbd/devices//name > +What: /sys/bus/rbd/devices//major > +What: /sys/bus/rbd/devices//client_id > +Date: Aug, 2010 > +KernelVersion: v2.6.37 > +Contact: Yehuda Sadeh , > + Sage Weil > +Description: > + size: (RO) The size (in bytes) of the mapped block > + device. > > - The block device minor number. (December 2013, since 3.14.) > + refresh: (WO) Writing to this file will reread the image > + header data and set all relevant data structures > + accordingly. > > -name > + current_snap: (RO) The current snapshot for which the device > + is mapped. > > - The name of the rbd image. > + name: (RO) The name of the rbd image. > > -image_id > + major: (RO) The block device major number. > > - The unique id for the rbd image. (For rbd image format 1 > - this is empty.) > + client_id: (RO) The ceph unique client id that was assigned > + for this specific session. > > -pool > > - The name of the storage pool where this rbd image resides. > - An rbd image name is unique within its pool. > +What: /sys/bus/rbd/devices//pool "pool" also goes back to v2.6.37. > +What: /sys/bus/rbd/devices//image_id "image_id" was added in v3.7. Having these documented is nice, but wrong versions and dates are worse than none at all. Please cross check the rest with git log/blame. > +What: /sys/bus/rbd/devices//features > +What: /sys/bus/rbd/devices//pool_id > +Date: Jul, 2012 > +KernelVersion: v3.10 > +Contact: Yehuda Sadeh , > + Sage Weil > +Description: > + pool: (RO) The name of the storage pool where this rbd > + image resides. An rbd image name is unique > + within its pool. > > -pool_id > + image_id: (WO) The unique id for the rbd image. (For rbd > + image format 1 this is empty.) image_id should be RO. > > - The unique identifier for the rbd image's pool. This is > - a permanent attribute of the pool. A pool's id will never > - change. > + features: (RO) A hexadecimal encoding of the feature bits > + for this image. > > -size > + pool_idr: (RO) The unique identifier for the rbd image's > + pool. This is a permanent attribute of the pool. > + A pool's id will never change. pool_idr -> pool_id > > - The size (in bytes) of the mapped block device. > > -refresh > +What: /sys/bus/rbd/devices//parent > +Date: Oct, 2012 > +KernelVersion: v3.10 > +Contact: Yehuda Sadeh , > + Sage Weil > +Description: > + (RO) Information identifying the chain of parent images in a > + layered rbd image. Entries are separated by empty lines. > > - Writing to this file will reread the image header data and set > - all relevant datastructures accordingly. > > -current_snap > +What: /sys/bus/rbd/devices//minor > +Date: Dec, 2013 > +KernelVersion: v3.14 > +Contact: Yehuda Sadeh , > + Sage Weil > +Description: > + (RO) The block device minor number. > > - The current snapshot for which the device is mapped. > > -snap_id > +What: /sys/bus/rbd/devices//snap_id > +What: /sys/bus/rbd/devices//config_info > +What: /sys/bus/rbd/devices//cluster_fsid > +What: /sys/bus/rbd/devices//client_addr > +Date: Aug, 2016 > +KernelVersion: v4.9 > +Contact: Yehuda Sadeh , > + Sage Weil > +Description: > + snap_id: (RO) The current snapshot's id. > > - The current snapshot's id. (August 2016, since 4.9.) > + config_info: (RO) The string written into > + /sys/bus/rbd/add{,_single_major}. > > -parent > + cluster_fsid: (RO) The ceph cluster UUID. > > - Information identifying the chain of parent images in a layered rbd > - image. Entries are separated by empty lines. > + client_addr: (RO) The ceph unique client > + entity_addr_t (address + nonce). The format is > +
:/: '1.2.3.4:1234/5678' or > + '[1:2:3:4:5:6:7:8]:1234/5678'. Thanks, Ilya