Original motivation is we want to run fstrim command
on Lustre[1] osd server mount point directly, however
our server mount point doesn't export osd directory
to users, and it will cause following command fail:
$fstrim -v /mnt/mds/
But following succeed:
$fstrim -v /mnt/mds
We could improve this a bit by getting realpath
before trapping kernel, this also give benifits
to normal use cases.
Cc: Andreas Dilger <adilger@dilger.ca> Cc: Shuichi Ihara <sihara@ddn.com>
[1] http://wiki.lustre.org/Main_Page Signed-off-by: Wang Shilong <wshilong@ddn.com>