J'ai une petite question sur les attributes de file étendu. Supposons que j'étale mes files avec des métadonnées dans des attributes étendus (par exemple, pour tenir count de l'intégrité – mais cela n'a pas d'importance pour ma question). Les questions qui se posent maintenant:
La réponse à votre question est spécifique au système de files. Pour ext3, par exemple, jetez un oeil à fs / ext3 / xattr.c , il contient la description suivante:
16 /* 17 * Extended atsortingbutes are stored directly in inodes (on file systems with 18 * inodes bigger than 128 bytes) and on additional disk blocks. The i_file_acl 19 * field contains the block number if an inode uses an additional block. All 20 * atsortingbutes must fit in the inode and one additional block. Blocks that 21 * contain the identical set of atsortingbutes may be shared among several inodes. 22 * Identical blocks are detected by keeping a cache of blocks that have 23 * recently been accessed. 24 * 25 * The atsortingbutes in inodes and on blocks have a different header; the ensortinges 26 * are stored in the same format: 27 * 28 * +------------------+ 29 * | header | 30 * | entry 1 | | 31 * | entry 2 | | growing downwards 32 * | entry 3 | v 33 * | four null bytes | 34 * | . . . | 35 * | value 1 | ^ 36 * | value 3 | | growing upwards 37 * | value 2 | | 38 * +------------------+ 39 * 40 * The header is followed by multiple entry descriptors. In disk blocks, the 41 * entry descriptors are kept sorted. In inodes, they are unsorted. The 42 * atsortingbute values are aligned to the end of the block in no specific order. 43 * 44 * Locking strategy 45 * ---------------- 46 * EXT3_I(inode)->i_file_acl is protected by EXT3_I(inode)->xattr_sem. 47 * EA blocks are only changed if they are exclusive to an inode, so 48 * holding xattr_sem also means that nothing but the EA block's reference 49 * count can change. Multiple writers to the same block are synchronized 50 * by the buffer lock. 51 */
En ce qui concerne la question "comment sont les attributes connectés", le lien est à l'inverse, l'inode a un lien vers les attributes étendus, voir EXT3_XATTR_NEXT
et ext3_xattr_list_ensortinges
dans xattr.h et xattr.c.
Pour récapituler, les attributes sont liés à l'inode et dépendent de fs, alors oui, vous perdrez les attributes lors de la gravure d'un CD rom ou de l'envoi d'un file par email.