On Wed, 29 Sep 1999 15:30:29 -0400 (EDT), Chuck Lever <cel@monkey.org> said:
> one of the difficulties i had understanding this code is the seeming
> interchangeability of the terms "unused" and "free". there are more
> than simply the three states alluded to in the block comment at the
> top of fs/inode.c:
> 4. zero count fs inode -- it's hashed, and on the in_use list, but
> is a target for reclamation if i_nrpages is zero (*)
> (*) since it's use count is zero, it can also be said that this type of
> inode is "unused."
No, these inodes are not necessarily unused. The page cache does not
count as a user on the inode's i_count field, but it does count against
the i_nrpages field. That's why the CAN_UNUSE macro reads as
#define CAN_UNUSE(inode) \
(((inode)->i_count | (inode)->i_state | (inode)->i_nrpages) == 0)
An inode with zero i_count may also be dirty, and hence still contain
important state.
--Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/