socsvn commit: r238839 - soc2012/oleksandr/udf-head/sys/fs/udf2
oleksandr at FreeBSD.org
oleksandr at FreeBSD.org
Mon Jul 2 20:24:06 UTC 2012
Author: oleksandr
Date: Mon Jul 2 20:24:02 2012
New Revision: 238839
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=238839
Log:
Reformat some part of code and and debug DPRINTF
Modified:
soc2012/oleksandr/udf-head/sys/fs/udf2/udf_vfsops.c
Modified: soc2012/oleksandr/udf-head/sys/fs/udf2/udf_vfsops.c
==============================================================================
--- soc2012/oleksandr/udf-head/sys/fs/udf2/udf_vfsops.c Mon Jul 2 19:56:31 2012 (r238838)
+++ soc2012/oleksandr/udf-head/sys/fs/udf2/udf_vfsops.c Mon Jul 2 20:24:02 2012 (r238839)
@@ -715,10 +715,13 @@
struct udf_mount *ump = VFSTOUDF(mp);
ino_t ino;
int error;
+
+ DPRINTF(CALL, ("udf_root called\n"));
dir_loc = &ump->fileset_desc->rootdir_icb;
ino = udf_get_node_id(dir_loc);
error = udf_vget(mp, ino, flags, vpp);
+
if (!((*vpp)->v_vflag & VV_ROOT)) {
printf("NOT A ROOT NODE?");
return (EDOOFUS);
@@ -734,14 +737,12 @@
struct udf_mount *ump = VFSTOUDF(mp);
struct logvol_int_desc *lvid;
struct udf_logvol_info *impl;
- uint64_t sizeblks, freeblks, files;
+ uint64_t sizeblks, freeblks, files = 0;
int num_part;
-/* mutex_enter(&ump->allocate_mutex); */
+ DPRINTF(CALL, ("udf_statvfs called\n"));
+ /* mutex_enter(&ump->allocate_mutex); */
udf_calc_freespace(ump, &sizeblks, &freeblks);
- //sizeblks = 0; // added to make if just compile.
- //freeblks = 0;
- files = 0;
lvid = ump->logvol_integrity;
num_part = le32toh(lvid->num_part);
@@ -752,29 +753,28 @@
}
/* mutex_exit(&ump->allocate_mutex); */
- sbp->f_version = STATFS_VERSION; /* structure version number */
- /*uint32_t f_type;*/ /* type of filesystem */
- sbp->f_flags = mp->mnt_flag; /* copy of mount exported flags */
+ sbp->f_version = STATFS_VERSION; /* structure version number */
+ /*uint32_t f_type;*/ /* type of filesystem */
+ sbp->f_flags = mp->mnt_flag; /* copy of mount exported flags */
sbp->f_bsize = ump->discinfo.sector_size; /* filesystem fragment size */
sbp->f_iosize = ump->discinfo.sector_size; /* optimal transfer block size */
- sbp->f_blocks = sizeblks; /* total data blocks in filesystem */
- sbp->f_bfree = freeblks; /* free blocks in filesystem */
- sbp->f_bavail = 0; /* free blocks avail to non-superuser */
- sbp->f_files = files; /* total file nodes in filesystem */
- sbp->f_ffree = 0; /* free nodes avail to non-superuser */
- /*uint64_t f_syncwrites;*/ /* count of sync writes since mount */
- /*uint64_t f_asyncwrites;*/ /* count of async writes since mount */
- /*uint64_t f_syncreads;*/ /* count of sync reads since mount */
- /*uint64_t f_asyncreads;*/ /* count of async reads since mount */
- /*uint64_t f_spare[10];*/ /* unused spare */
- /*uint32_t f_namemax;*/ /* maximum filename length */
- /*uid_t f_owner;*/ /* user that mounted the filesystem */
- /*fsid_t f_fsid;*/ /* filesystem id */
- /*char f_charspare[80];*/ /* spare string space */
- /*char f_fstypename[MFSNAMELEN];*/ /* filesystem type name */
- /*char f_mntfromname[MNAMELEN];*/ /* mounted filesystem */
- /*char f_mntonname[MNAMELEN];*/ /* directory on which mounted */
-
+ sbp->f_blocks = sizeblks; /* total data blocks in filesystem */
+ sbp->f_bfree = freeblks; /* free blocks in filesystem */
+ sbp->f_bavail = 0; /* free blocks avail to non-superuser */
+ sbp->f_files = files; /* total file nodes in filesystem */
+ sbp->f_ffree = 0; /* free nodes avail to non-superuser */
+ /*uint64_t f_syncwrites;*/ /* count of sync writes since mount */
+ /*uint64_t f_asyncwrites;*/ /* count of async writes since mount */
+ /*uint64_t f_syncreads;*/ /* count of sync reads since mount */
+ /*uint64_t f_asyncreads;*/ /* count of async reads since mount */
+ /*uint64_t f_spare[10];*/ /* unused spare */
+ /*uint32_t f_namemax;*/ /* maximum filename length */
+ /*uid_t f_owner;*/ /* user that mounted the filesystem */
+ /*fsid_t f_fsid;*/ /* filesystem id */
+ /*char f_charspare[80];*/ /* spare string space */
+ /*char f_fstypename[MFSNAMELEN];*/ /* filesystem type name */
+ /*char f_mntfromname[MNAMELEN];*/ /* mounted filesystem */
+ /*char f_mntonname[MNAMELEN];*/ /* directory on which mounted */
return (0);
}
@@ -876,6 +876,7 @@
struct udf_mount *ump;
int error, udf_file_type;
+ DPRINTF(NOTIMPL, ("udf_vget called\n"));
error = vfs_hash_get(mp, ino, flags, curthread, vpp, NULL, NULL);
if (error || *vpp != NULL)
return (error);
@@ -994,8 +995,7 @@
uint64_t filelen;
int error;
- error = VFS_VGET(mp, ufid->ino, LK_EXCLUSIVE, &nvp);
- if (error != 0) {
+ if ((error = VFS_VGET(mp, ufid->ino, LK_EXCLUSIVE, &nvp)) != 0) {
*vpp = NULLVP;
return (error);
}
More information about the svn-soc-all
mailing list