Changeset 89dd2ec4 in rtems


Ignore:
Timestamp:
Jun 3, 2012, 11:06:51 AM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.10
Children:
a078d6f0
Parents:
0d65339
git-author:
Sebastian Huber <sebastian.huber@…> (06/03/12 11:06:51)
git-committer:
Gedare Bloom <gedare@…> (01/11/18 17:12:53)
Message:

dosfs: Fix for no space left on device condition

The file size was wrong in the no space left on device condition. This
resulted in turn in a read of an invalid block which lead to an EIO
error status.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/src/dosfs/fat_file.c

    r0d65339 r89dd2ec4  
    533533    /*  check wether we satisfied request for 'cls2add' clusters */
    534534    if (cls2add != cls_added)
    535         *a_length = new_length -
    536                     ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
    537                     (bytes2add & (fs_info->vol.bpc - 1));
     535    {
     536        new_length -= bytes2add & (fs_info->vol.bpc - 1);
     537        new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2;
     538    }
    538539
    539540    /* add new chain to the end of existed */
     
    584585    }
    585586
     587    *a_length = new_length;
    586588    fat_fd->fat_file_size = new_length;
    587589
Note: See TracChangeset for help on using the changeset viewer.