Skip to contentSkip to conversation

New: File Size

Bug 201973 [email protected] 1 participant 2 messages Dec 12, 2018

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=201973

            Bug ID: 201973
           Summary: File Size
           Product: File System
           Version: 2.5
    Kernel Version: 3.10.0-862.el7.x86_64
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: XFS
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

Created attachment 279965
--> https://bugzilla.kernel.org/attachment.cgi?id=279965&action=edit
file size

hi
when my log file is used by program and i truncate it, file size is release on disk but ll/ls command show old size of file, but du command work correctly

good luck

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 201973] File Size

https://bugzilla.kernel.org/show_bug.cgi?id=201973

Eric Sandeen ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |INVALID

--- Comment #1 from Eric Sandeen ([email protected]) ---
Hi, this is the upstream kernel bug tracker, and 3.10.0-862.el7.x86_64 is not an upstream kernel. This is not the appropriate bug tracker for distribution kernels.

Also, you've not provided any reproducer steps, just a screenshot of du & ls which shows no problem.

There is no expectation that du should match ls. One reflects the maximum offset in a file, the other reflects the amount of space allocated to the file.
They are two different quantities. Observe:

# fallocate -l 161m output.out
# truncate --size 18g output.out
# du -h output.out
161M    output.out
# ls -lh output.out
-rw-r--r--. 1 root root 18G Dec 12 10:30 output.out
Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.