NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/51264: Fix src/sbin/fsck_lfs/bufcache.c



The following reply was made to PR bin/51264; it has been noted by GNATS.

From: Jose Luis Rodriguez Garcia <joseyluis%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: bin/51264: Fix src/sbin/fsck_lfs/bufcache.c
Date: Mon, 15 Aug 2016 17:28:21 +0200

 I think that it is a very usual situation.
 Reading the code (I copy it from lfs_cleanerd.c file), it is called
 when the ifile grows.
 Ifile grows when the number of inodes increases. (Margo paper, page
 10, first paragraph)
 (file=inode map + segment usage table).
 
         /* If Ifile is larger than buffer cache, rehash */
         fstat(fs->clfs_ifilefd, &st);
         if (st.st_size / lfs_sb_getbsize(fs) > hashmax) {
                 ohashmax = hashmax;
                 bufrehash(st.st_size / lfs_sb_getbsize(fs));
                 dlog("%s: resized buffer hash from %d to %d",
                      lfs_sb_getfsmnt(fs), ohashmax, hashmax);
         }
 
 
 
 On Mon, Aug 1, 2016 at 2:05 AM, David Holland <dholland-bugs%netbsd.org@localhost> wrote:
 >  It is called when it reloads the ifile, which it does before cleaning
 >  every segment (apparently) - this will actually resize it since it
 >  calls bufinit() with 4, but it'll do it before it does any real work.
 >  And since the ifile doesn't grow on the fly unless you try to do an
 >  online resize, it probably won't have much effect.
 >
 >  however, I misread that earlier.
 >
 >  I now think pulling it up is worthwhile.
 >
 >  --
 >  David A. Holland
 >  dholland%netbsd.org@localhost
 >
 


Home | Main Index | Thread Index | Old Index