Lines Matching +full:charge +full:- +full:current +full:- +full:limit +full:- +full:mapping
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * layout.h - All NTFS associated on-disk structures. Part of the Linux-NTFS
6 * Copyright (c) 2001-2005 Anton Altaparmakov
71 approx. 4.7x10^21 bytes. (-; */
117 * operator! (-8
163 * been written to disk. The values 0 and -1 (ie. 0xffff) are not used. All
170 * (obviously) finish before the last le16 of the first 512-byte sector.
175 NTFS_RECORD_TYPE magic; /* A four-byte magic identifying the record
212 FILE_BadClus = 8, /* Contains all bad clusters in the non-resident
223 FILE_reserved12 = 12, /* Reserved for future use (records 12-15). */
227 FILE_first_user = 16, /* First user file, used as test limit for
232 * These are the so far known MFT_RECORD_* flags (16-bit) which contain
246 * A reference consists of a 48-bit index into the mft and a 16-bit sequence
249 * For error reporting purposes we treat the 48-bit index as a signed quantity.
259 * FIXME: Since inodes are 32-bit as of now, the driver needs to always check
262 * to become HUGE in order to need more than 32-bits worth of mft records.
264 * the non-resident attributes, etc.) would require 4Tb of space on their own
267 * horrible thing to do as it would trash our current driver implementation. )-:
268 * Do I hear screams "we want 64-bit inodes!" ?!? (-;
280 * Typedef the MFT_REF as a 64-bit value for easier handling.
314 /* 0 NTFS_RECORD; -- Unfolded here as gcc doesn't like unnamed structs. */
338 NOTE: Must be aligned to 8-byte boundary. */
343 NOTE: Must be aligned to 8-byte boundary. */
357 potential extents, belonging to the non-base
383 /* 0 NTFS_RECORD; -- Unfolded here as gcc doesn't like unnamed structs. */
407 NOTE: Must be aligned to 8-byte boundary. */
412 NOTE: Must be aligned to 8-byte boundary. */
426 potential extents, belonging to the non-base
447 * System defined attributes (32-bit). Each attribute type has a corresponding
452 * a revealing choice of symbol I do not know what is... (-;
479 * The collation rules for sorting views/indexes/etc (32-bit).
481 * COLLATION_BINARY - Collate by binary compare where the first byte is most
483 * COLLATION_UNICODE_STRING - Collate Unicode strings by comparing their binary
486 * COLLATION_FILE_NAME - Collate file names as Unicode strings. The collation
493 * COLLATION_NTOFS_ULONG - Sorting is done according to ascending le32 key
496 * COLLATION_NTOFS_SID - Sorting is done according to ascending SID values.
498 * COLLATION_NTOFS_SECURITY_HASH - Sorting is done first by ascending hash
501 * COLLATION_NTOFS_ULONGS - Sorting is done according to a sequence of ascending
503 * sorts by object_id (16-byte), by splitting up the object_id in four
529 * The flags (32-bit) describing attribute properties in the attribute
543 must contain at least one non-zero
558 non-resident. Without this, only log
571 * attribute can be resident/non-resident and possibly other things, but the
589 * Attribute flags (16-bit).
605 * Only the data attribute is ever compressed in the current ntfs driver in
607 * non-resident. Finally, to use compression, the maximum allowed cluster size
612 * non-resident attribute record header (more precisely: X = 2^compression_unit
620 * entry has length = X and lcn = -1. The mapping pairs array actually
622 * all, which is then interpreted by the driver as lcn = -1.
633 * length = X and lcn >= 0. The mapping pairs array stores this as
639 * list entry has length L < X and lcn >= 0. The mapping pairs array
642 * immediately followed by a sparse entry with length = X - L and
643 * lcn = -1. The latter entry is to make up the vcn counting to the
651 * L - X. Another example: if length L < X, this does not necessarily mean that
655 * following runlist entry describes at least X - L sparse clusters, thus
670 * Flags of resident attributes (8-bit).
681 * Attribute record header. Always aligned to 8-byte boundary.
685 /* 0*/ ATTR_TYPE type; /* The (32-bit) type of the attribute. */
687 attribute (aligned to 8-byte boundary).
690 If 1, attribute is non-resident. */
698 follow with attribute value or mapping pairs
699 array, resident and non-resident attributes
700 respectively, aligning to an 8-byte
714 align to 8-byte boundary if we
717 of 8-bytes. */
719 /* 23 */ s8 reserved; /* Reserved/alignment to 8-byte
722 /* Non-resident attributes. */
727 case). - Only when an attribute list is used
730 the attribute value. - Usually there is only one
732 value size in clusters minus 1. Can be -1 for
736 beginning of the structure to the mapping pairs
740 record header aligned to 8-byte boundary. */
748 /* 35*/ u8 reserved[5]; /* Align to 8-byte boundary. */
750 be difficult to keep them up-to-date.*/
779 * File attribute flags (32-bit) appearing in the file_attributes fields of the
839 * are the number of 100-nanosecond intervals since 1st January 1601, 00:00:00
841 * 00:00:00 UTC and is stored as the number of 1-second intervals since then.)
864 updated on read-only volumes). In
874 /* 36*/ u8 reserved12[12]; /* Reserved/alignment to 8-byte
887 * Assume NTFS 1.2- format.
891 * Use NTFS 1.2- format for access.
895 * arbitrarily large values thus spoiling this check. - But chkdsk probably
912 /* 56*/ le64 quota_charged; /* Byte size of the charge to
929 * - Can be either resident or non-resident.
930 * - Value consists of a sequence of variable length, 8-byte aligned,
932 * - The list is not terminated by anything at all! The only way to know when
933 * the end is reached is to keep track of the current offset and compare it to
935 * - The attribute list attribute contains one entry for each attribute of
939 * non-resident attribute (if present) immediately follow after the initial
942 * - Further restrictions:
943 * - If not resident, the vcn to lcn mapping array has to fit inside the
945 * - The attribute list attribute value has a maximum size of 256kb. This
947 * - Attribute lists are only used when the attributes of mft record do not
949 * non-resident) having been made non-resident. This can happen e.g. when:
950 * - File has a large number of hard links (lots of file name
952 * - The mapping pairs array of some non-resident attribute becomes so
954 * - The security descriptor is very complex (not applicable to
956 * - There are many named streams.
961 /* 4*/ le16 length; /* Byte size of this entry (8-byte aligned). */
969 is non-zero for the case where one attribute
996 * Possible namespaces for filenames in ntfs (8-bit).
1018 /* The standard DOS filenames (8.3 format). Uppercase only. All 8-bit
1052 /* 28*/ sle64 allocated_size; /* Byte size of on-disk allocated space
1091 * 128-bit value consisting of one group of eight hexadecimal digits, followed
1096 * 1F010768-5A73-BC91-0010A52216A7
1112 * birth_volume_id - object_id of FILE_Volume on which the file was first
1114 * birth_object_id - object_id of file when it was first created. Usually
1116 * domain_id - Reserved (always zero).
1156 * The pre-defined IDENTIFIER_AUTHORITIES used as SID_IDENTIFIER_AUTHORITY in
1160 // SECURITY_NULL_SID_AUTHORITY = {0, 0, 0, 0, 0, 0}, /* S-1-0 */
1161 // SECURITY_WORLD_SID_AUTHORITY = {0, 0, 0, 0, 0, 1}, /* S-1-1 */
1162 // SECURITY_LOCAL_SID_AUTHORITY = {0, 0, 0, 0, 0, 2}, /* S-1-2 */
1163 // SECURITY_CREATOR_SID_AUTHORITY = {0, 0, 0, 0, 0, 3}, /* S-1-3 */
1164 // SECURITY_NON_UNIQUE_AUTHORITY = {0, 0, 0, 0, 0, 4}, /* S-1-4 */
1165 // SECURITY_NT_SID_AUTHORITY = {0, 0, 0, 0, 0, 5}, /* S-1-5 */
1170 * authorities to make up universal well-known SIDs.
1174 * For example, the universal well-known SID Creator Owner ID (S-1-3-0) is
1179 SECURITY_NULL_RID = 0, /* S-1-0 */
1180 SECURITY_WORLD_RID = 0, /* S-1-1 */
1181 SECURITY_LOCAL_RID = 0, /* S-1-2 */
1183 SECURITY_CREATOR_OWNER_RID = 0, /* S-1-3 */
1184 SECURITY_CREATOR_GROUP_RID = 1, /* S-1-3 */
1186 SECURITY_CREATOR_OWNER_SERVER_RID = 2, /* S-1-3 */
1187 SECURITY_CREATOR_GROUP_SERVER_RID = 3, /* S-1-3 */
1213 * Well-known domain relative sub-authority values (RIDs).
1249 * The universal well-known SIDs:
1251 * NULL_SID S-1-0-0
1252 * WORLD_SID S-1-1-0
1253 * LOCAL_SID S-1-2-0
1254 * CREATOR_OWNER_SID S-1-3-0
1255 * CREATOR_GROUP_SID S-1-3-1
1256 * CREATOR_OWNER_SERVER_SID S-1-3-2
1257 * CREATOR_GROUP_SERVER_SID S-1-3-3
1259 * (Non-unique IDs) S-1-4
1261 * NT well-known SIDs:
1263 * NT_AUTHORITY_SID S-1-5
1264 * DIALUP_SID S-1-5-1
1266 * NETWORD_SID S-1-5-2
1267 * BATCH_SID S-1-5-3
1268 * INTERACTIVE_SID S-1-5-4
1269 * SERVICE_SID S-1-5-6
1270 * ANONYMOUS_LOGON_SID S-1-5-7 (aka null logon session)
1271 * PROXY_SID S-1-5-8
1272 * SERVER_LOGON_SID S-1-5-9 (aka domain controller account)
1273 * SELF_SID S-1-5-10 (self RID)
1274 * AUTHENTICATED_USER_SID S-1-5-11
1275 * RESTRICTED_CODE_SID S-1-5-12 (running restricted code)
1276 * TERMINAL_SERVER_SID S-1-5-13 (running on terminal server)
1278 * (Logon IDs) S-1-5-5-X-Y
1280 * (NT non-unique IDs) S-1-5-0x15-...
1282 * (Built-in domain) S-1-5-0x20
1286 * The SID_IDENTIFIER_AUTHORITY is a 48-bit value used in the SID structure.
1293 u16 high_part; /* High 16-bits. */
1294 u32 low_part; /* Low 32-bits. */
1300 * The SID structure is a variable-length structure used to uniquely identify
1304 * S-R-I-S-S...
1306 * - The first "S" is the literal character 'S' identifying the following
1308 * - R is the revision level of the SID expressed as a sequence of digits
1310 * - I is the 48-bit identifier_authority, expressed as digits as R above.
1311 * - S... is one or more sub_authority values, expressed as digits as above.
1313 * Example SID; the domain-relative SID of the local Administrators group on
1315 * S-1-5-32-544
1331 * Current constants for SIDs.
1334 SID_REVISION = 1, /* Current revision level. */
1341 * The predefined ACE types (8-bit, see below).
1371 * The ACE flags (8-bit) for audit and inheritance (see below).
1397 * An ACE is an access-control entry in an access-control list (ACL).
1399 * the types of access that generate system-administration messages or alarms
1403 * Each ACE starts with an ACE_HEADER structure (aligned on 4-byte boundary),
1415 * The access mask (32-bit). Defines the access rights.
1451 * children), even if the files are read-only. (DIRECTORY)
1530 * For directories, the mapping has the same numerical value. See
1539 * For directories, the mapping has the same numberical value. See
1548 * The generic mapping array. Used to denote the mapping of each generic
1568 /* 0 ACE_HEADER; -- Unfolded here as gcc doesn't like unnamed structs. */
1579 * The object ACE flags (32-bit).
1589 /* 0 ACE_HEADER; -- Unfolded here as gcc doesn't like unnamed structs. */
1606 * An ACL is an access-control list (ACL).
1610 * are aligned on 4-byte boundaries.
1623 * Current constants for ACLs.
1626 /* Current revision. */
1640 * The security descriptor control flags (16-bit).
1642 * SE_OWNER_DEFAULTED - This boolean flag, when set, indicates that the SID
1648 * SE_GROUP_DEFAULTED - This boolean flag, when set, indicates that the SID in
1654 * SE_DACL_PRESENT - This boolean flag, when set, indicates that the security
1659 * SE_DACL_DEFAULTED - This boolean flag, when set, indicates that the ACL
1666 * SE_SACL_PRESENT - This boolean flag, when set, indicates that the security
1671 * SE_SACL_DEFAULTED - This boolean flag, when set, indicates that the ACL
1678 * SE_SELF_RELATIVE - This boolean flag, when set, indicates that the security
1679 * descriptor is in self-relative form. In this form, all fields of the
1706 * Self-relative security descriptor. Contains the owner and group SIDs as well
1736 * descriptors. On disk, a self-relative security descriptor is used.
1760 * Current constants for security descriptors.
1763 /* Current revision. */
1768 the same as pointers, at least on ia32 architecture are 32-bit. */
1773 * Attribute: Security descriptor (0x50). A standard self-relative security
1776 * NOTE: Can be resident or non-resident.
1834 * The $SDS data stream contains the security descriptors, aligned on 16-byte
1846 /* 0 SECURITY_DESCRIPTOR_HEADER; -- Unfolded here as gcc doesn't like
1852 /* 20*/ SECURITY_DESCRIPTOR_RELATIVE sid; /* The self-relative security
1885 * Possible flags for the volume (16-bit).
1901 /* To make our life easier when checking if we must mount read-only. */
1925 * NOTE: Can be resident or non-resident.
1934 * Index header flags (8-bit).
1970 aligned to 8-byte boundary. */
1973 size, aligned to 8-byte boundary. */
1984 u8 reserved[3]; /* Reserved/align to 8-byte boundary. */
1998 * are present: an index allocation attribute, containing sub-nodes of the B+
2024 u8 reserved[3]; /* Reserved/align to 8-byte boundary. */
2032 * NOTE: Always non-resident (doesn't make sense to be resident anyway!).
2039 /* 0 NTFS_RECORD; -- Unfolded here as gcc doesn't like unnamed structs. */
2082 * Quota flags (32-bit).
2137 sle64 threshold; /* Soft quota (-1 if not limited). */
2138 sle64 limit; /* Hard quota (-1 if not limited). */ member
2147 * Predefined owner_id values (32-bit).
2156 * Current constants for quota control entries.
2159 /* Current version. */
2164 * Index entry flags (16-bit).
2168 sub-node, i.e. a reference to an index block in form of
2172 represent a file but it can point to a sub-node. */
2175 enum bit width to 16-bit. */
2200 8-bytes. */
2203 multiple of 8-bytes. */
2205 /* 14*/ le16 reserved; /* Reserved/align to 8-byte boundary. */
2218 /* 0 INDEX_ENTRY_HEADER; -- Unfolded here as gcc dislikes unnamed structs. */
2235 8-bytes. */
2238 multiple of 8-bytes. */
2240 le16 reserved; /* Reserved/align to 8-byte boundary. */
2266 // entries immediately preceding the current entry (the
2268 // of the non-resident index allocation attribute). If
2271 // key_length, the address of the 8-byte boundary
2273 // (char*)ie + le16_to_cpu(ie*)->length) - sizeof(VCN),
2295 * The reparse point tag is an unsigned 32-bit value divided in three parts:
2304 * bit 30: High-latency bit. If set, accessing the first byte of data will
2337 * NOTE: Can be resident or non-resident.
2342 le16 reserved; /* Align to 8-byte boundary. */
2364 * Extended attribute flags (8-bit).
2377 * NOTE: Can be resident or non-resident.
2397 * Intended to support Native Structure Storage (NSS) - a feature removed from
2407 * NOTE: Can be resident or non-resident.