gfs2: st_size is 0 for symbolic links

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I had an application fail on gfs2 today because of incorrect stat
st_size on a symlink. The application was trying to utilize the fact
that st_size on a symlink should be the character length of the
destination path.

[root@somehost somepath]# touch somefile
[root@somehost somepath]# ln -s somefile somelink
[root@somehost somepath]# stat somelink |grep Size
  Size: 0               Blocks: 8          IO Block: 4096   symbolic link
[root@somehost somepath]# gfs2_tool getargs /somepath
noatime 0
data 2
suiddir 0
quota 0
posix_acl 1
num_glockd 1
upgrade 0
debug 0
localflocks 0
localcaching 0
ignore_local_fs 0
spectator 0
hostdata jid=0:id=196612:first=1
locktable
lockproto

[root@somehost somepath]# uname -r
2.6.18-128.1.10.el5

[root@somehost somepath]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.3 (Tikanga)


If i go to some other host or remount the filesystem, then st_size is correct:

[root@someotherhost somepath]# stat somelink |grep Size
  Size: 8               Blocks: 8          IO Block: 4096   symbolic link

Searched archives and didn't see anything. Is this a bug?

-nate

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux