Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    pwp
    pwp is offline
    Just 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

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,379
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •