Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753862AbbDHMHc (ORCPT ); Wed, 8 Apr 2015 08:07:32 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:27548 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751463AbbDHMHa (ORCPT ); Wed, 8 Apr 2015 08:07:30 -0400 X-AuditID: cbfee61b-f79536d000000f1f-81-552519faf07a From: Krzysztof Opasiak To: balbi@ti.com, gregkh@linuxfoundation.org, jlbec@evilplan.org Cc: andrzej.p@samsung.com, m.szyprowski@samsung.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Krzysztof Opasiak Subject: [PATCH v2 0/4] Ensure that lun ids are contiguous Date: Wed, 08 Apr 2015 14:06:44 +0200 Message-id: <1428494808-12566-1-git-send-email-k.opasiak@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPJMWRmVeSWpSXmKPExsVy+t9jAd1fkqqhBm/my1vMetnOYnHwfr1F 8+L1bBYnz31jsbg9cRqbxebvHWwWl3fNYbNYtKyV2WLtkbvsDpweTy8Geeyfu4bdo2/LKkaP 4ze2M3l83iQXwBrFZZOSmpNZllqkb5fAlbHoZWjBMb6K5fMWsDYwLuLuYuTkkBAwkdhxcysb hC0mceHeejBbSGARo8SVtUFdjFxA9i9Gif1bnrN2MXJwsAnoS8zbJQpiigg4SJzZUQRSwiyw jVHi6Y4Z7CC9wgJWEhOOLmMEsVkEVCXWvpvFDlLPK+AqceyzNIgpIaAgMWeSzQRG7gWMDKsY RVMLkguKk9JzjfSKE3OLS/PS9ZLzczcxgoPlmfQOxlUNFocYBTgYlXh4BRarhAqxJpYVV+Ye YpTgYFYS4T3DpRoqxJuSWFmVWpQfX1Sak1p8iFGag0VJnHeOrlyokEB6YklqdmpqQWoRTJaJ g1OqgTFMts5i8rXsYxMYvR/3vE0Qiz3a+/rDglrXY+oXq14ySiXbLk7fZXLN5EbehqOifrdy 37cl5S1cPD8x8WnRr/Ub7HXcvbccvzY94MDzsKfxT1YxGTovujRXrEXGxGbX0iuyl8M3vhBX uXug6uVTobqtr7dmTJ70fe/7Iu9fafE2Mo05v43bpr5VYinOSDTUYi4qTgQAWlXfghICAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2044 Lines: 68 Dear list, This series fix configfs interface for mass storage function. According to mass storage specification[1]: "Logical Unit Numbers on the device shall be numbered contiguously starting from LUN 0 to a maximum LUN of 15 (Fh)." Currently configfs interface allows to create LUNs with arbitrary ids what causes problems with some host side mass storage drivers. This patch extends configfs interface with unlocked version of configfs_depend_item() which should be used only in configfs callbacks. This allows to protect from removing lun directory from the middle of id space. Example: as is: $ mkdir mass_storage.name $ mkdir lun.3 $ mkdir lun.5 $ rmdir lun.3 After this series: $ mkdir mass_storage.name $ mkdir lun.3 mkdir: cannot create directory 'lun.3': Invalid argument $ mkdir lun.1 $ mkdir lun.2 $ rmdir lun.1 rmdir: failed to remove 'lun.1': Device or resource busy $ rmdir lun.2 $ rmdir lun.1 -- Best regards, Krzysztof Opasiak Samsung R&D Institute Poland Samsung Electronics --- Changes since v1: - drop incorrect typo fix ("iff" is not a typo but shorten version of "if and only if") Krzysztof Opasiak (4): fs: configfs: Add unlocked version of configfs_depend_item() usb: gadget: mass_storage: Store lun_opts in fsg_opts usb: gadget: mass_storage: Ensure that lun ids are contiguous Documentation: ABI: Fix documentation for mass_storage function .../ABI/testing/configfs-usb-gadget-mass-storage | 7 +++- drivers/usb/gadget/function/f_mass_storage.c | 40 ++++++++++++++++++-- drivers/usb/gadget/function/f_mass_storage.h | 1 + fs/configfs/dir.c | 29 ++++++++++++++ include/linux/configfs.h | 9 +++++ 5 files changed, 81 insertions(+), 5 deletions(-) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/