Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-19255

mirror write functions should not round up bytes to write(!)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Medium
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      The functions:

      lfs_mirror_write
      llapi_mirror_copy
      llapi_mirror_copy_many
      llapi_mirror_resync_many_params 

      All share the same mistake, rounding up the number of bytes to write before writing out:

      /* round up to page align to make direct IO happy. */
      to_write = ((bytes_read - 1) | (page_size - 1)) + 1; 

      I noticed this when playing with them - copying a small input file, they round up the size to 4K and put junk padding in.

      I'll push a patch and try to include some tests.

      Attachments

        Activity

          People

            paf0186 Patrick Farrell
            paf0186 Patrick Farrell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: