lkml.org 
[lkml]   [1999]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: inode->i_data.nrpages still used in clear_inode()
From
Date
>>>>> " " == 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/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.031 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site