From: Jan Cincera <hcincera@gmail.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Namjae Jeon <linkinjeon@kernel.org>,
Sungjong Seo <sj1557.seo@samsung.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] exfat: add ioctls for accessing attributes
Date: Mon, 28 Aug 2023 20:55:01 +0200 [thread overview]
Message-ID: <c2b1cd09-f35e-9281-81a2-75e4d624ae0f@gmail.com> (raw)
In-Reply-To: <20230828161251.GA28160@frogsfrogsfrogs>
On Mon, Aug 28, 2023, Darrick J. Wong wrote:
> On Sun, Aug 27, 2023 at 12:42:07PM +0200, Jan Cincera wrote:
>> Add GET and SET attributes ioctls to enable attribute modification.
>> We already do this in FAT and a few userspace utils made for it would
>> benefit from this also working on exFAT, namely fatattr.
>>
>> Signed-off-by: Jan Cincera <hcincera@gmail.com>
>> ---
>> Changes in v2:
>> - Removed irrelevant comments.
>> - Now masking reserved fields.
>>
>> fs/exfat/exfat_fs.h | 6 +++
>> fs/exfat/file.c | 93 +++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 99 insertions(+)
>>
>> diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h
>> index 729ada9e26e8..ebe8c4b928f4 100644
>> --- a/fs/exfat/exfat_fs.h
>> +++ b/fs/exfat/exfat_fs.h
>> @@ -149,6 +149,12 @@ enum {
>> #define DIR_CACHE_SIZE \
>> (DIV_ROUND_UP(EXFAT_DEN_TO_B(ES_MAX_ENTRY_NUM), SECTOR_SIZE) + 1)
>>
>> +/*
>> + * attribute ioctls, same as their FAT equivalents.
>> + */
>> +#define EXFAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32)
>> +#define EXFAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32)
>
> Can you reuse the definitions from include/uapi/linux/msdos_fs.h instead
> of redefining them here?
>
> Otherwise this looks like a mostly straight port of the fs/fat/
> versions of these functions.
>
> --D
>
I don't think that's necessary right now, as exfat doesn't reuse attribute
definitions either. With some refactoring of existing code we could reuse
both, but I've been trying to keep this patch as simple as possible.
Jan Cincera
next prev parent reply other threads:[~2023-08-28 18:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-27 10:42 Jan Cincera
2023-08-28 16:12 ` Darrick J. Wong
2023-08-28 18:55 ` Jan Cincera [this message]
2023-08-30 14:13 ` Namjae Jeon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c2b1cd09-f35e-9281-81a2-75e4d624ae0f@gmail.com \
--to=hcincera@gmail.com \
--cc=djwong@kernel.org \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sj1557.seo@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®