On 13 Feb 2015, at 19:18, Maxime Villard <[email protected]> wrote: > Hi, > this may be a stupid question; in ufs/ffs/ffs_vfsops.c, l.1153: > > if (fs->fs_sbsize < SBLOCKSIZE) > brelse(bp, BC_INVAL); > else > brelse(bp, 0); > > However 'fs->fs_sbsize' is *always* smaller than SBLOCKSIZE. So only > the first branch is reached.
It may be equal to SBLOCKSIZE. The BC_INVAL is here to not keep the buffer in cache. It may be read later with a size greater fs_sbsize and would break buffer cache invariance (blocks are always read with the same size). > I don't understand what the BC_INVAL flag means, and its definition > in sys/buf.h is not very enlightening: > > #define BC_INVAL 0x00002000 /* Does not contain valid info. > */ > > Which branch do I keep? Both. -- J. Hannken-Illjes - [email protected] - TU Braunschweig (Germany)
