summaryrefslogtreecommitdiff
path: root/core/fs/xfs/xfs_readdir.c
Commit message (Collapse)AuthorAgeFilesLines
* xfs: Add support for v3 directoriesPaulo Alcantara2015-12-141-53/+98
| | | | | | | | | | | | Besides supporting newer version of xfs file system, this patch also does some code refactoring and fix completely broken listing and searching on v2-3 node directories. Cc: Gene Cumm <gene.cumm@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Raphael S. Carvalho <raphael.scarv@gmail.com> Cc: Ady <ady-sf@hotmail.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* xfs: Flush cache of directory blocks once done with readdir()Paulo Alcantara2013-01-221-4/+18
| | | | Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* xfs: Remove unnecessary free()'sPaulo Alcantara2013-01-221-17/+3
| | | | | | | Those freed memories are all now cached and need to get flushed at some point. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* xfs: Add cache for directory blocksPaulo Alcantara2013-01-211-25/+12
| | | | | | | | This cache will avoid lots of malloc() and free() calls for getting an allocated area for directory blocks whenever listing and finding directory entries. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* xfs: Avoid useless malloc()'s and free()'sPaulo Alcantara2013-01-211-20/+7
| | | | | | | This patch speeds up the process of retrieving and comparing entry names while looking up inodes. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* xfs: Make it more verbose on debugPaulo Alcantara2013-01-211-1/+11
| | | | Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* xfs: Add xfs_readlink()Chen Baozi2012-09-021-0/+2
| | | | | | | | | | XFS's symbolic links to a file can be stored in one of two formats: "local" and "extents". The length of the symlink contents is always specified by the inode's di_size value. A symlink cannot be longer than 1024 characters. Signed-off-by: Chen Baozi <baozich@gmail.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* xfs: Rework xfs_dir2_get_right_blk()Chen Baozi2012-09-021-4/+2
| | | | | | | | | | In B+tree directory, besides the node/leaf blocks, all the extents which store xfs_bmbt_rec_t entries are also organized in B+tree. We need to rework xfs_dir2_get_right_blk() to make it workable in all cases. Signed-off-by: Chen Baozi <baozich@gmail.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* xfs: Fix memory leak in xfs_dir2_node_find_entry() functionPaulo Alcantara2012-07-291-1/+1
| | | | | | | | If xfs_dir2_node_find_entry() wasn't able to find a data block, the leaf pointer were not being freed through the label "out", so we must use the label "out1" instead. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* xfs: Cleanup xfs_readdir_dir2_leaf() functionPaulo Alcantara2012-07-291-21/+15
| | | | Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* xfs: Implement xfs_readdir_dir2_node() functionPaulo Alcantara2012-07-291-3/+122
| | | | | | | Now, xfs_readdir filesystem op will be able to list directory entries from node directories. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* xfs: Move readdir functions to another source filePaulo Alcantara2012-07-281-0/+291
All readdir functions get bigger in size when lookup functions are added to xfs_dir2.c accordingly, so we need to move them out to another source file. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>