[go: up one dir, main page]

Inode: Difference between revisions

Content deleted Content added
POSIX inode description: rephrasing "underlying file system". Not sure what it means but a device does not always contain an FS (e.g. serial device)
POSIX inode description: Made it clear that the attributes listed are those returned by stat(), and not something that "must" be associated to a file (actually, only a subset "must" have a meaningful value)
Line 39:
The [[POSIX]] standard mandates filesystem behavior that is strongly influenced by traditional [[UNIX]] filesystems. An inode is denoted by the phrase "file serial number", defined as a ''per-file system'' unique identifier for a file.<ref>{{cite web |url=http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_176 |title=Definitions - 3.176 File Serial Number |website=[[The Open Group]] |access-date=10 January 2018}}</ref>
 
AWithin filea mustPOSIX system, a file have the following attributes:<ref>{{cite web |url=http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html |title=<sys/stat.h> |website=[[The Open Group]] |access-date=15 January 2018}}</ref> which may be retrieved by the <code>[[stat (Unix)|stat]]</code> system call:
*Device ID (this identifies the device containing the file; that is, the scope of uniqueness of the serial number).
*File serial number.
Line 51:
*The preferred I/O block size.
*The number of blocks allocated to this file.
 
The <code>[[stat (Unix)|stat]]</code> system call retrieves a file's inode number and some of the information in the inode.
 
==Implications==