[Linux-cluster] gfs2: st_size is 0 for symbolic links

Steven Whitehouse swhiteho at redhat.com
Mon Jun 1 16:07:32 UTC 2009


Hi,

That was bz #492911 and its now fixed both upstream and in RHEL,

Steve.

On Mon, 2009-06-01 at 11:03 -0500, Nathaniel Griswold wrote:
> 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 at somehost somepath]# touch somefile
> [root at somehost somepath]# ln -s somefile somelink
> [root at somehost somepath]# stat somelink |grep Size
>   Size: 0               Blocks: 8          IO Block: 4096   symbolic link
> [root at 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 at somehost somepath]# uname -r
> 2.6.18-128.1.10.el5
> 
> [root at 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 at 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 at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-cluster




More information about the Linux-cluster mailing list