Results 1 to 2 of 2
Hi, all
the function ext2_find_shared is located fs/ext2/inode.c 935
I see ext2_find_shared is related with truncation, but i don't know
what's the use of it.
And i am also confused ...
- 06-29-2010 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 1
question about ext2_find_shared
Hi, all
the function ext2_find_shared is located fs/ext2/inode.c 935
I see ext2_find_shared is related with truncation, but i don't know
what's the use of it.
And i am also confused with the implementation of ext2_find_shared.
It would be greatly appreciated if somebody can show me what's the use
of ext2_find_shared and how it works.
Regards
- 07-05-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,961
I haven't written file system drivers so I may be incorrect; however, from my glancing at the relevant code, find_shared() (redefined for each file system type, so that there is an ext2_find_shared(), ext3_find_shared(), etc.) I think that it is determining where a file may be safely truncated in the blocks allocated to it so they can be returned to the file system for reuse.
So, why do you want/need to know this? Are you writing your own file system driver?Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
