Received: by 10.223.185.116 with SMTP id b49csp406179wrg; Tue, 20 Feb 2018 01:10:27 -0800 (PST) X-Google-Smtp-Source: AH8x226f84oexncCkyaznZelq0j1TQWEY2CYCTl8Gxh4P5n//FCZfqXd8EsMp+F6gM+Q2fFQQQ5/ X-Received: by 10.98.5.129 with SMTP id 123mr17269380pff.75.1519117826910; Tue, 20 Feb 2018 01:10:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519117826; cv=none; d=google.com; s=arc-20160816; b=rxiZQ8YUevZ42jdNmNkokjnRJjPBNcs//xqRjy8Gk4r8EwHNH6kqtW8KJojhRoBnhy Y4bVGtIsgRh+nOhPn18nRJHmo0r0SkaIfCsJlsBbpaicvS5Uj1u4Dk2oVedri0uVof0w FCb1fgX97Wfx28zkgYhN5RS2Bick+vOMZVSJg6DI0DuvbAe429WRxGQuEa1YMAfxHuIG gKAeuz6HmXtR+J+p6HYtTeLOpYU8ArAITOPCiae9EJFZtZRbpHEw+3+u3z8TKG3WmGOG VyRE7rYY1Em4eju+6Co5lqlDXn/AxmhvsARye6uY8Vgbnyakyk/MkhSqu+TmRT0wKXEz 3wzQ== 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=4nGm3A0SeOhpCuVhrtuwrK3ZHWyRFGfAYE1zgY7DM9o=; b=ZdU1nnDi+YQQy36xiELSn62aDl1daR93i650pzhzcIeJRV/kpZDH6MEWXmMLSk3woc ScZUSfaXVbkIksiB5urQxWTzBzAz4SWAjCu+Fas/8cDlznzIbg9dikv27EAwiZVpaINr 2JD6QD/ULPAhpK08sVM1NH6deiQesWaYhNmLPFJ/mioGJ4FoV3jsPpXvjBPpbDVg/PyD A/rp05sq/k2lmVTWnj02B63GEkQ+cw4lDFSJti3xRTlSTPCctbCRpC6h1zvjiPyPhazk +BJJK0Baqzt5rr27Bey7D8nSU1NevPP55lmIeEuAOlMU7XAufQNn1WUm+ElVmSRNEaKM W6dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eyvDa1u6; 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 a18si4823812pgn.669.2018.02.20.01.10.12; Tue, 20 Feb 2018 01:10:26 -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=eyvDa1u6; 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 S1751465AbeBTJJK (ORCPT + 99 others); Tue, 20 Feb 2018 04:09:10 -0500 Received: from mail-it0-f48.google.com ([209.85.214.48]:55629 "EHLO mail-it0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751119AbeBTJJF (ORCPT ); Tue, 20 Feb 2018 04:09:05 -0500 Received: by mail-it0-f48.google.com with SMTP id n7so2895392ita.5; Tue, 20 Feb 2018 01:09:05 -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=4nGm3A0SeOhpCuVhrtuwrK3ZHWyRFGfAYE1zgY7DM9o=; b=eyvDa1u6zwFAWLZTw+XvIpoAOorTpxuaw5RVN1Z1Mpy9wbKkkXTSdKp8/pRd/KOjS+ llJdfmS3xirpeWF6BvoogAwUY6qFiT80VIFTOHCxZjc9hIjVsv7y2T0cfZxGOQ7p322U w4jm1ZaYLyCYtwjafb2EBMMomnBQjGmtOHUxQsuRHWJPDvEEgOFrgXiaoUmE85og49Rp tsRN7u5S/m4PzBc3qlR/nZIdERfV+0nPoT+DV/8YuruyPW3iiU6EL5cCIJ2eg56Geydo iHcexJn/oaIHeEPURshqWiVISGevl+dAEThPerNj6kWslTXb97SmJtc8JOEtGzXqMgur 6Fpg== 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=4nGm3A0SeOhpCuVhrtuwrK3ZHWyRFGfAYE1zgY7DM9o=; b=aFWn+6NTBhjMOCXb8S1NUQHn/Q9JQP32iNKG9tmK4Aldn9IoOEuLpiGE8Hzq7RIjZN 2FIGQQ3TsvfF6VSqvGoC/PR9ykNjbJs6h5Qinn4aRMDB/n290JcRDAFW5M2zDQs+JhUO miC7sxUuKshAcc100Y93WTGwLOn7RvDMx4KorW4QERwyJzH0kUlDPN711n2X5nN9O1Mi CR+PLwzvNmrbtGeUKpeWZLHCP0jStQ3W2CsoapKWEKomKL7iBQDqPElw+hjUfn51OU4R +cXh3WSQZdvFv+nLNTBjsE/TL2WYIClA3wHFwAvhBOormRoaHbBKmS6TfHSdxLiMfPnZ S9Ug== X-Gm-Message-State: APf1xPBs6qpHvDa0d06FgIqiAb1RocFObZIjb/8AAZlwqG0TykYBa2Fz rVCKBYXsHS8DDVfxmO2U7+aULw== X-Received: by 10.36.54.66 with SMTP id l63mr23854507itl.50.1519117744942; Tue, 20 Feb 2018 01:09:04 -0800 (PST) Received: from mordor.localdomain ([183.82.19.191]) by smtp.gmail.com with ESMTPSA id h3sm24221288itd.39.2018.02.20.01.09.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Feb 2018 01:09:04 -0800 (PST) Date: Tue, 20 Feb 2018 14:38: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] block: rbd: update sysfs interface Message-ID: <20180220090859.GA22737@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 --- 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 +Date: Jan, 2012 +KernelVersion: v3.10 Contact: Yehuda Sadeh , Sage Weil 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 + 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 +What: /sys/bus/rbd/devices//image_id +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.) - 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. - 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'. -- 2.16.1