Mercurial > illumos > illumos-gate
changeset 3960:8ab802bbe8b2
6532475 fsck states incorrect number of large files when found file with size bigger then UFS_MAXOFFSET_T
author | jk201079 |
---|---|
date | Tue, 03 Apr 2007 03:12:32 -0700 |
parents | 9962881f8438 |
children | d0e2cb165836 |
files | usr/src/cmd/fs.d/ufs/fsck/inode.c |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/fs.d/ufs/fsck/inode.c Mon Apr 02 23:50:34 2007 -0700 +++ b/usr/src/cmd/fs.d/ufs/fsck/inode.c Tue Apr 03 03:12:32 2007 -0700 @@ -1,5 +1,5 @@ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -1386,7 +1386,14 @@ n_files--; dp = ginode(ino); - if (dp->di_size > (u_offset_t)MAXOFF_T) { + /* + * We need to make sure that the file is really a large file. + * Everything bigger than UFS_MAXOFFSET_T is treated as a file with + * negative size, which shall be cleared. (see verify_inode() in + * pass1.c) + */ + if (dp->di_size > (u_offset_t)MAXOFF_T && + dp->di_size <= (u_offset_t)UFS_MAXOFFSET_T) { largefile_count--; } truncino(ino, 0, update_parent);