IBM Support

IJ03091: FILE SIZE MAY NOT BE UPDATED CORRECTLY AFTER A TRUNCATE CALL

 

APAR status

  • Closed as program error.

Error description

  • If a truncate() call is used to set the size of a file to
    something larger than the size the last write left it at,
    the filesystem may not correctly update the size of the
    file.
    
    Reported in:
    Spectrum Scale 4.2.3.2 on RHEL 7.3 x86_64
    
    Known Impact:
    If an application is expecting a file to be of a certain
    size, and a later stat() call shows the size of that file
    to be something different, that may cause the application
    to believe that the file is corrupt.
    
    Verification steps:
    One example to recreate this issue is to use a 4 MiB
    block
    size for the data pool in a filesystem, and use the
    following test program to demonstrate the problem:
    
    main()
    {
       system("dd if=/dev/zero bs=1 seek=22864437303 count=1
    of=/gpfs2/test");
       truncate("/gpfs2/test", 22868010952);
    }
    
    # ls -l /gpfs2/test
    -rw-r--r-- 1 root root 22867345408 Nov  9 12:00
    /gpfs2/test
    
    22864437303 bytes are written to the file, the size of
    the file is set to 22868010952 by truncate(), but stat()
    (ls) shows the file size as 22867345408.
    

Local fix

Problem summary

  • In rare case, truncate() does not set file size
    correctly. The file size is set to full block boundary,
    the fragment is lost.
    

Problem conclusion

  • Fix the logic error.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IJ03091

  • Reported component name

    SPECTRUM SCALE

  • Reported component ID

    5725Q01AP

  • Reported release

    423

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-01-09

  • Closed date

    2018-01-09

  • Last modified date

    2019-06-28

  • APAR is sysrouted FROM one or more of the following:

    IJ01911

  • APAR is sysrouted TO one or more of the following:

    IJ03149 IJ05607

Fix information

  • Fixed component name

    SPECTRUM SCALE

  • Fixed component ID

    5725Q01AP

Applicable component levels

  • R423 PSY U885025

       19/06/28 I 1000

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"STXKQY","label":"IBM Spectrum Scale"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"423","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSFKCN","label":"General Parallel File System"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"423","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
28 June 2019