xfs
[Top] [All Lists]

Re: I think that get direct directory size int the xfs file system

To: "lihongliang@xxxxxxxxx" <lihongliang@xxxxxxxxx>
Subject: Re: I think that get direct directory size int the xfs file system
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Tue, 27 Jan 2015 07:44:59 -0500
Cc: xfs <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <201501261707321631278@xxxxxxxxx>
References: <201501261707321631278@xxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Mon, Jan 26, 2015 at 05:07:37PM +0800, lihongliang@xxxxxxxxx wrote:
> Hello
>         Can get direct directory size int the XFS file system?
> exampleï
>  root@ficsNode1 test1]# mount | grep xfs 
> /dev/sdc on /xfs type xfs (rw,uquota) 
> [root@ficsNode1 test1]# pwd 
> /xfs/test1 
> [root@ficsNode1 test1]# ls -lh 
> total 5M 
> -rw-r--r-- 1 root root 1.0M Jan 26 09:33 block1 
> -rw-r--r-- 1 root root 1.0M Jan 26 09:33 block2 
> -rw-r--r-- 1 root root 1.0M Jan 26 09:33 block3 
> -rw-r--r-- 1 root root 1.0M Jan 26 09:33 block4 
> -rw-r--r-- 1 root root 1.0M Jan 26 09:33 block5 
> [root@ficsNode1 test1]#  
> 
>    can I get direct it  by call system function the that the /xfs/test1 is 5M?
> 

No, because that 5MB data point is not a direct attribute of the
directory. It's the sum of the space used by files within the directory.
The blocks used by the directory itself are filled with directory
entries (e.g., data structures that contain the file names listed above
along with a reference to an inode).

A tool like ls or du is used to process a directory to obtain cumulative
data such as the total space used by files in some particular subtree.

Brian

> 
> lihongliang@xxxxxxxxx

> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>