From: Hyunchul Lee <hyc.lee@gmail.com>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: Hyunchul Lee <hyc.lee@gmail.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
cheol.lee@lge.com
Subject: [PATCH] ntfs: match ntfs_resident_attr_min_value_length with $AttrDef
Date: Mon, 4 May 2026 08:29:51 +0900 [thread overview]
Message-ID: <20260503232951.3710803-1-hyc.lee@gmail.com> (raw)
Update ntfs_resident_attr_min_value_length() to align with $AttrDef.
The Windows 11 $AttrDef values are as follows:
Attribute Name (ID) Size (Min-Max) Flags
$STANDARD_INFORMATION (16) 48-72 Resident
$ATTRIBUTE_LIST (32) No Limit Non-resident
$FILE_NAME (48) 68-578 Resident, Index
$OBJECT_ID (64) 0-256 Resident
$SECURITY_DESCRIPTOR (80) No Limit Non-resident
$VOLUME_NAME (96) 2-256 Resident
$VOLUME_INFORMATION (112) 12-12 Resident
$DATA (128) No Limit (None)
$INDEX_ROOT (144) No Limit Resident
$INDEX_ALLOCATION (160) No Limit Non-resident
$BITMAP (176) No Limit Non-resident
$REPARSE_POINT (192) 0-16384 Non-resident
$EA_INFORMATION (208) 8-8 Resident
$EA (224) 0-65536 (None)
$LOGGED_UTILITY_STREAM (256) 0-65536 Non-resident
Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
---
fs/ntfs/attrib.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c
index 78915c1d5128..4950fc2fa536 100644
--- a/fs/ntfs/attrib.c
+++ b/fs/ntfs/attrib.c
@@ -576,24 +576,15 @@ static u32 ntfs_resident_attr_min_value_length(const __le32 type)
case AT_STANDARD_INFORMATION:
return offsetof(struct standard_information, ver) +
sizeof(((struct standard_information *)0)->ver.v1.reserved12);
- case AT_ATTRIBUTE_LIST:
- return offsetof(struct attr_list_entry, name);
case AT_FILE_NAME:
- return offsetof(struct file_name_attr, file_name);
- case AT_OBJECT_ID:
- return sizeof(struct guid);
- case AT_SECURITY_DESCRIPTOR:
- return sizeof(struct security_descriptor_relative);
+ return offsetof(struct file_name_attr, file_name) +
+ sizeof(__le16) * 1;
+ case AT_VOLUME_NAME:
+ return sizeof(__le16) * 1;
case AT_VOLUME_INFORMATION:
return sizeof(struct volume_information);
- case AT_INDEX_ROOT:
- return sizeof(struct index_root);
- case AT_REPARSE_POINT:
- return offsetof(struct reparse_point, reparse_data);
case AT_EA_INFORMATION:
return sizeof(struct ea_information);
- case AT_EA:
- return offsetof(struct ea_attr, ea_name) + 1;
default:
return 0;
}
--
2.43.0
reply other threads:[~2026-05-03 23:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260503232951.3710803-1-hyc.lee@gmail.com \
--to=hyc.lee@gmail.com \
--cc=cheol.lee@lge.com \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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