Re: do ext3 symlinks cost any data blocks?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 31, 2008 at 09:08:12AM -0400, Robert P. J. Day wrote:
>   i'm reading some documentation that claims that neither ext3 device
> files nor symlinks cost you any data blocks in the filesystem.  sure,
> that's obvious with device files, but symlinks?
> 
>   i always thought that symlinks cost you a single data block -- just
> enough to store the actual character value of the file being linked
> to.  the only way i could see that not being true was if the ext3
> inode allocated some space internally to hold that information for
> suitably short filenames, but i've perused the ext3_inode structure in
> include/linux/ext3_fs.h and i don't see that unless i'm just missing
> it.
> 
>   thoughts?  can anyone clarify this?  thanks.

Most if not all classic Unix filesystems I know store the destination
of the symlink directly in the inode itself, usually in the space that
is normally used for the block list (direct, indirect, double indirect
and triple indirect blocks). If the destination name is longer than the
required space, they will allocate a data block for it instead.


Erik

-- 
Erik Mouw -- mouw@xxxxxxxxxxxx

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux