Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752306AbdLYLW4 (ORCPT ); Mon, 25 Dec 2017 06:22:56 -0500 Received: from smtpbgau2.qq.com ([54.206.34.216]:45011 "EHLO smtpbgau2.qq.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752180AbdLYLWy (ORCPT ); Mon, 25 Dec 2017 06:22:54 -0500 X-QQ-mid: esmtp12t1514200969t2lxch6r2 X-QQ-SSF: A1000000000000907H100000000000R X-QQ-FEAT: pd5qap3UvPDbQ1zpx1JhsM++5PZqrD3/1fyrNkC5P+VR69is0Svzxj6/+AEWv pCvbhhDKouByFDIZpbU0A+H0bHoR9THHsX9AzLTCYnf6TXtI3AD7oEfxmSJhhAC8YQyw2IY Dweewn6HciF5yZehFLHbWN7S8tclUb42P21d1QHmiKuPuLKEAmnWudCP616EFIwtp/rMwu0 2ccXLwW/TiWDzLUD2KeXznJ6zX0ClpiVuFnUXxsxjCKfBE9I5HZdv8TNhpcp9kUaLsHmfej hNdD88xbY0w/186CQTPsLpPDg= X-QQ-GoodBg: 0 From: ChenGuanqiao To: hirofumi@mail.parknet.co.jp Cc: linux-kernel@vger.kernel.org, ChenGuanqiao Subject: [PATCH v4 0/2] fs: fat: add ioctl to modify fat filesystem partion volume label Date: Mon, 25 Dec 2017 19:20:18 +0800 Message-Id: <20171225112020.2267-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 Content-Length: 1159 Lines: 36 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 data region (FAT32), root directory (FAT12, FAT16). Thus, the boot sector just needs to be upgrade when the label writing. 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 (2): fs: fat: Add fat filesystem partition volume label in local structure fs: fat: add ioctl method in fat filesystem driver fs/fat/fat.h | 1 + fs/fat/file.c | 133 ++++++++++++++++++++++++++++++++++++++++++ fs/fat/inode.c | 15 ++++- include/uapi/linux/msdos_fs.h | 2 + 4 files changed, 148 insertions(+), 3 deletions(-) -- 2.11.0