Bug 206407

Summary: symlinks incorrectly reports dangling links for files larger than 2GB
Product: [Fedora] Fedora Reporter: John Wiederhold <jwiederhold>
Component: symlinksAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: high Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 1.2-25.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-18 15:47:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 150225    

Description John Wiederhold 2006-09-14 05:52:51 UTC
Description of problem:
symlinks incorrectly reports dangling links for files larger than 2GB
Using the "-d" option it will delete those links, dispite the fact that they
point to valid files.
It also prints a error message on regular files larger than 2GB.

"symlinks" needs to have Large File Support (LFS).

Version-Release number of selected component (if applicable):
symlinks-1.2-24.2.1

How reproducible:
Always.

Steps to Reproduce:
1. Create a a large file:
[root@server test]# dd if=/dev/zero of=bigfile bs=1024M count=2
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB) copied, 33.5197 seconds, 64.1 MB/s

2. Create a symlink (in another directory in this example)
[root@server test]# mkdir links
[root@server test]# cd links
[root@server links]# ln -s ../bigfile
[root@server links]# ls -l bigfile
lrwxrwxrwx 1 root root 10 Sep 13 22:45 bigfile -> ../bigfile

3.  Run "symlinks ." and confirm that the link is correct.
[root@server links]# symlinks .
dangling: /root/test/links/bigfile -> ../bigfile
[root@server links]# ls -l ../bigfile
-rw-r--r-- 1 root root 2147483648 Sep 13 22:39 ../bigfile

4.  Also show the "symlinks" error message on large regular files
[root@server links]# cd ..
[root@server test]# symlinks .
/root/test/bigfile: Value too large for defined data type

Actual results:
As you can see in the above example the "symlinks" command reports dangling
links, but then a "ls -l" of the symlink shows that the link is _not_ dangling.
 The file is over 2GB.

Expected results:
Expect that "symlinks" would not report the link as dangling.  What's worse is
that when you use the "-d" option it will delete the link.

Additional info:
File system type is ext3.  Also tryed on JFS with same results.