From 426c85303bfb03fa8e343182f30d266dad621fcc Mon Sep 17 00:00:00 2001 From: plougher Date: Tue, 14 Oct 2008 05:34:55 +0000 Subject: More comments --- kernel/fs/squashfs/export.c | 16 ++++++++++++++-- kernel/fs/squashfs/fragment.c | 6 +++--- kernel/fs/squashfs/id.c | 4 ++-- 3 files changed, 19 insertions(+), 7 deletions(-) (limited to 'kernel') diff --git a/kernel/fs/squashfs/export.c b/kernel/fs/squashfs/export.c index 9c8cc2d..b59bfeb 100644 --- a/kernel/fs/squashfs/export.c +++ b/kernel/fs/squashfs/export.c @@ -21,6 +21,20 @@ * export.c */ +/* + * This file implements code to make Squashfs filesystems exportable (NFS etc.) + * + * The export code uses an inode lookup table to map inode numbers passed in + * filehandles to an inode location on disk. This table is stored compressed + * into metadata blocks. A second index table is used to locate these. This + * second index table for speed of access (and because it is small) is read at + * mount time and cached in memory. + * + * The inode lookup table is used only by the export code, inode disk + * locations are directly encoded in directories, enabling direct access + * without an intermediate lookup for all operations except the export ops. + */ + #include #include #include @@ -92,8 +106,6 @@ static struct dentry *squashfs_get_parent(struct dentry *child) { struct inode *i = child->d_inode; - TRACE("Entered squashfs_get_parent\n"); - return squashfs_export_iget(i->i_sb, SQUASHFS_I(i)->parent_inode); } diff --git a/kernel/fs/squashfs/fragment.c b/kernel/fs/squashfs/fragment.c index 2ebbbae..f0f3e51 100644 --- a/kernel/fs/squashfs/fragment.c +++ b/kernel/fs/squashfs/fragment.c @@ -26,11 +26,11 @@ * datablocks). * * Regular files contain a fragment index which is mapped to a fragment - * location on disk and compressed size using a fragment lookup table. + * location on disk and compressed size using a fragment lookup table. * Like everything in Squashfs this fragment lookup table is itself stored * compressed into metadata blocks. A second index table is used to locate - * these compressed metadata blocks. This index table for speed of access - * (and because it is small) is read at mount time and cached in memory. + * these. This second index table for speed of access (and because it + * is small) is read at mount time and cached in memory. */ #include diff --git a/kernel/fs/squashfs/id.c b/kernel/fs/squashfs/id.c index 044547e..d2920c9 100644 --- a/kernel/fs/squashfs/id.c +++ b/kernel/fs/squashfs/id.c @@ -27,8 +27,8 @@ * For space efficiency regular files store uid and gid indexes, which are * converted to 32-bit uids/gids using an id look up table. This table is * stored compressed into metadata blocks. A second index table is used to - * locate these. This index table for speed of access (and because it is - * small) is read at mount time and cached in memory. + * locate these. This second index table for speed of access (and because it + * is small) is read at mount time and cached in memory. */ #include -- cgit v1.2.3