Received: by 10.223.185.116 with SMTP id b49csp513912wrg; Fri, 23 Feb 2018 02:22:50 -0800 (PST) X-Google-Smtp-Source: AH8x2264VoOjXQuHXCZD0fGAYwAGO1c946Z9a94tYKJpFeRzRT3zxYeSrJo++3VNrZhQogg0DgnH X-Received: by 10.98.231.26 with SMTP id s26mr1273848pfh.210.1519381370011; Fri, 23 Feb 2018 02:22:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519381369; cv=none; d=google.com; s=arc-20160816; b=Z+slgVm5dJsA+L52DMNIqgT1wivwzEHJ9YTNWGI4DxXkKEmw8DzNjoTuw9GLlmV2s0 YNc4mD6+znW+vuZIu1AnfizqV57Z6Q8mpl1fx5mnYXpM/1Rt7XzXA2SLBFN9co/D9uE/ z3RdBGPxZpwj1v40C7oZdUePuov9KkIW80myaUa4lfh8dLeJqXWgGfTWn2xg2QPdURVs HFpsF9/09oSwWTT1I8dXuv0QGsSa6DxZsfQ4AsoN+IVj67avfOf9VEvweq78frsUpATY 40xo+SDA8AbrFbz5bzxDYOcP0slOkxSvpIoXrUxeEObNS7FbfdtI9mFj2o93c8zte5P+ NfSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=4QaphbK5ICcs4rTzJBavOllbSvNPLUcvOMn64W/nhc0=; b=Tl2iw/qwuPXUc8EGKGRhf86QxJRNkVZQ7G2PM8/xDLbIHjLEhmJii6HOLdJwilg1ph hOqYyIsFwKS9yAyXTZwwD/GST3uhqMBhNZx4q0xvBEmH5iIAy4TfCGXvrGgdU3GXYv/+ b7Q8stjL30pYQYpKfHBsBvVJK/TfvsVG6tHWOKm6qYKBpgazhqBNfPNcPvXp7AJgo6l3 sTvgP8pp/1FIjeq4FkPrkZtXWxMC88m5HQIS/BsS9Iu3ov1XLzs2vLrls9BchzJdyKLj zbteI4Losr2jol0PPa+nW8YBKV4Il2shw614tP4ymsCd09f606pWsiid8oN/NbWFB5+0 XcHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vRMGZQIH; 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 14-v6si1564218plb.444.2018.02.23.02.22.36; Fri, 23 Feb 2018 02:22:49 -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=vRMGZQIH; 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 S1751926AbeBWKUJ (ORCPT + 99 others); Fri, 23 Feb 2018 05:20:09 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:44819 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751334AbeBWKUH (ORCPT ); Fri, 23 Feb 2018 05:20:07 -0500 Received: by mail-io0-f193.google.com with SMTP id z6so9300093iob.11; Fri, 23 Feb 2018 02:20:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=4QaphbK5ICcs4rTzJBavOllbSvNPLUcvOMn64W/nhc0=; b=vRMGZQIHDYvKhSU7UDZtrbg/75EV8AFAOjGi5aIXg75i9vlVUoHxCPH5TxmMBtwJvg C5JnTlontNQtoGIGtZgwLMXGaDv9WT2gdO+MVTkezSZnX2nmdNLRxgp6tom0W3nHm7y1 oH2vtLLGVSIwqxbDJkngggpfkHl2wzaFraykUlPVA73JbFO5/tufpFJCBbeeQVluQ9pu 7r0fRTiiZ6zkLvaKqtJjr8qBWQPaLK4jx00tB33KGwwt4E4sm6mBJ0Gi440oFU7nqd7M 2dqNgYQlLjSLE4LjGUW58eDpWPKXu+TBk/8F1zHMQrdwVTRRPInRDC4rtQ0aOL+ewA7u 0ZuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=4QaphbK5ICcs4rTzJBavOllbSvNPLUcvOMn64W/nhc0=; b=CBJwxuhlTO6cirikDbexo0GJpgMAqoLpDY13E4vrez6t0GVfJoV+2y6kwCRlaQ5ydx Gp8rVBrkSGZF23lsFJAGOAV5rdwQbiJY1uApV76w/4+oXK2bn/OTFd2D2NG21i1uL90v 92wsk6T0x8joBuK1QDkya+aSb/AzL1OB/YzgFh0Q/SjWMsivG7pp7mMpktXXJgeu3liv NDnvf7Oz68q5UgvL3FvczMI5InjKC9IrF2BOAJxhxdEkM5ZxAe0qpcoBXNKcAt9yMZMI 3t0nU5iySyo6yIJSqbSY9EugbFYGKEdQ0DfCn9W/pS4fui7Xr+JbOxm8IPtISMpUFUZA 5NHA== X-Gm-Message-State: APf1xPCEB6iYSgVqs6gtTCQBvGLIB+huSAhrkEmGAnJkqpx2nfjSvcsx MXGdsC9m/syiZR4TzlcRJPQ= X-Received: by 10.107.242.14 with SMTP id q14mr1216691ioh.240.1519381206179; Fri, 23 Feb 2018 02:20:06 -0800 (PST) Received: from mordor.localdomain ([183.82.19.191]) by smtp.gmail.com with ESMTPSA id o124sm1154232ith.12.2018.02.23.02.20.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Feb 2018 02:20:05 -0800 (PST) Date: Fri, 23 Feb 2018 15:49:59 +0530 From: Aishwarya Pant To: Ilya Dryomov , Sage Weil , Alex Elder , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Corbet , Greg KH Cc: Julia Lawall Subject: [PATCH v2] block: rbd: update sysfs interface Message-ID: <20180223101959.GA4441@mordor.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Changes in v2: - Update dates and kernel version. Sorry, my scripts have been acting up :/ - Update contact information. Would it be more appropriate to use the mailing list ceph-devel@vger.kernel.org in the contact section? - (WO) -> (RO) in image_id - Fix typo pool_idr -> pool_id Documentation/ABI/testing/sysfs-bus-rbd | 203 +++++++++++++++++++------------- 1 file changed, 122 insertions(+), 81 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd index f208ac58d613..cc30bee8b5f4 100644 --- a/Documentation/ABI/testing/sysfs-bus-rbd +++ b/Documentation/ABI/testing/sysfs-bus-rbd @@ -1,121 +1,162 @@ -What: /sys/bus/rbd/ -Date: November 2010 -Contact: Yehuda Sadeh , - Sage Weil +What: /sys/bus/rbd/add +Date: Oct, 2010 +KernelVersion: v2.6.37 +Contact: Sage Weil Description: + (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. -Usage: [force] +What: /sys/bus/rbd/remove +Date: Oct, 2010 +KernelVersion: v2.6.37 +Contact: Sage Weil +Description: + (WO) Remove rbd block device. + + 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: 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: 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. +What: /sys/bus/rbd/supported_features +Date: Mar, 2017 +KernelVersion: v4.11 +Contact: Sage Weil +Description: + (RO) Displays the features supported by the rbd module 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//major +What: /sys/bus/rbd/devices//client_id +What: /sys/bus/rbd/devices//pool +What: /sys/bus/rbd/devices//name +What: /sys/bus/rbd/devices//refresh +What: /sys/bus/rbd/devices//current_snap +Date: Oct, 2010 +KernelVersion: v2.6.37 +Contact: Sage Weil +Description: + size: (RO) The size (in bytes) of the mapped block + device. -minor + major: (RO) The block device major number. - The block device minor number. (December 2013, since 3.14.) + client_id: (RO) The ceph unique client id that was assigned + for this specific session. -name + pool: (RO) The name of the storage pool where this rbd + image resides. An rbd image name is unique + within its pool. - The name of the rbd image. + name: (RO) The name of the rbd image. -image_id + refresh: (WO) Writing to this file will reread the image + header data and set all relevant data structures + accordingly. - The unique id for the rbd image. (For rbd image format 1 - this is empty.) + current_snap: (RO) The current snapshot for which the device + is mapped. -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_id +Date: Jul, 2012 +KernelVersion: v3.6 +Contact: Sage Weil +Description: + (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_id - The unique identifier for the rbd image's pool. This is - a permanent attribute of the pool. A pool's id will never - change. +What: /sys/bus/rbd/devices//image_id +What: /sys/bus/rbd/devices//features +Date: Oct, 2012 +KernelVersion: v3.7 +Contact: Sage Weil +Description: + image_id: (RO) The unique id for the rbd image. (For rbd + image format 1 this is empty.) -size + features: (RO) A hexadecimal encoding of the feature bits + for this image. - The size (in bytes) of the mapped block device. -refresh +What: /sys/bus/rbd/devices//parent +Date: Nov, 2012 +KernelVersion: v3.8 +Contact: 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: 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: 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'. -- 2.16.2