Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752537AbeABGpM (ORCPT + 1 other); Tue, 2 Jan 2018 01:45:12 -0500 Received: from smtpbg65.qq.com ([103.7.28.233]:18947 "EHLO smtpbg65.qq.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750787AbeABGpI (ORCPT ); Tue, 2 Jan 2018 01:45:08 -0500 X-QQ-mid: esmtp31t1514875502ta6rcp38m X-QQ-SSF: A1000000000000F0FH110400000000R X-QQ-FEAT: D/t2lZ0awEDwHQz1AYu9vtRfStun1dJ4iJSolgWcl6m6LfJDdYbmF5WoYK518 0ZIbe3EX9LpkMpnb+9+EA4Z2YchDVRwewxQ2TlJuJqWh+FDYg6zMLwscAq53VgDjQfqXdVf rsorGkwrBDRmmGiLqekYaliOHjKJehK9AzXVDWodrlPgNetXlvk5lEH0+uHTnpjkts7rn4e Ka0zpUilJ61CAEvXFSfxyF8QO0f04L5qjOx2IMT63XdV0RqmddXqYyRQ5mnUjHHP2lxT7yO R0qF1pfQ8BJ6ik X-QQ-GoodBg: 0 From: ChenGuanqiao To: hirofumi@mail.parknet.co.jp Cc: linux-kernel@vger.kernel.org, ChenGuanqiao Subject: [PATCH v6 0/3] fs: fat: add ioctl to modify fat filesystem partion volume label Date: Tue, 2 Jan 2018 14:42:26 +0800 Message-Id: <20180102064229.25202-1-chen.chenchacha@foxmail.com> X-Mailer: git-send-email 2.11.0 X-QQ-SENDSIZE: 520 Feedback-ID: esmtp:foxmail.com:bgforeign:bgforeign1 X-QQ-Bgrelay: 1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: The FAT filesystem partition volume label can be read with FAT_IOCTL_GET_VOLUME_LABEL and written with FAT_IOCTL_SET_VOLUME_LABEL. FAT volume label (volume name) is exactly same stored in boot sector and root directory. Thus, the boot sector just needs to be upgrade when the label writing. v6: 1. fixed volume label name check function. 2. add volume label entry if no volume label. v5: 1. find the volume label entry through the scan function. 2. the volume label only retains the d-characters (reference from Ecma-107). v4: 1. read/write volume label from/to the location of the respective version. 2. correct volume label check reference from mkfs.fat. 3. fixed some code issue. v3: 1. write volume label both boot sector and root directory. v2: 1. add filesystem version check. 2. add diretory permissions check. 3. add volume label string check. 4. fixed part of return value. 5. fixed some indent issue. 6. remove sync_dirty_buffer(). ChenGuanqiao (3): fs: fat: Add fat filesystem partition volume label in local structure fs: fat: Add volume label entry method function fs: fat: add ioctl method in fat filesystem driver fs/fat/dir.c | 62 +++++++++++++++++ fs/fat/fat.h | 6 ++ fs/fat/file.c | 150 ++++++++++++++++++++++++++++++++++++++++++ fs/fat/inode.c | 15 ++++- include/uapi/linux/msdos_fs.h | 2 + 5 files changed, 232 insertions(+), 3 deletions(-) -- 2.11.0