Messages in this thread | | | Subject | Re: inode->i_data.nrpages still used in clear_inode() | From | Trond Myklebust <> | Date | 23 Nov 1999 16:44:00 +0100 |
| |
>>>>> " " == Miquel van Smoorenburg <miquels@cistron.nl> writes:
> I am porting my "rawfs" (filesystem that makes it possible to > mount a complete disk and the partitions show up as files) to > 2.3.29pre3.
> It seems to work, and I can read/write files but when I unmount > the partition, clear_inode() is called for all used inodes and > it calls BUG() because inode->i_data.nrpages != 0.
> The happens even if I mount the filesystem, dd a couple of > blocks from one of the files to /dev/null, and umount it.
> Any idea where I should start looking? What uses i_data.nrpages > / what resource needs to be freed ?
> Thanks for any hints
The BUG() seems to have been inserted to ensure that truncate_inode_pages() is called on the inode before it is cleared. (This frees up the page cache)
The easiest way to ensure this is to make your 'put_inode()' method call truncate_inode_pages() whenever the i_count falls to 1. See the code in 'fs/inode.c:iput()'...
Cheers, Trond
- 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/
| |