[Ocfs2-devel] [PATCH 1/1] Ocfs2: Teach truncating and punching-hole codes to handle fastsymlink.
Joel Becker
Joel.Becker at oracle.com
Tue Mar 23 19:32:46 PDT 2010
On Wed, Mar 24, 2010 at 10:21:57AM +0800, tristan wrote:
> Joel Becker wrote:
> > The difference is that we never call the truncate code for fast
> > symlinks or inline data in the kernel. We do in libocfs2.
>
> Really?
>
> Truncating for inline data is common I guess, for symlink, we may lack
> of method to truncate it from userspace via ftruncate(2).
>
> But it's ok to be there, right?
It's not OK to be there. The truncate system call will error if
it is not a regular file. Same with OCFS2_IOC_UNRESVP. Thus no symlink
can get there. ocfs2_truncate_for_delete() checks i_clusters before
calling the real truncate code. Thus it avoids fast symlinks and inline
data.
Joel
--
"Too much walking shoes worn thin.
Too much trippin' and my soul's worn thin.
Time to catch a ride it leaves today
Her name is what it means.
Too much walking shoes worn thin."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-devel
mailing list