Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 0d4db0f in mainline for uspace/lib/ext4/libext4_filesystem.c


Ignore:
Timestamp:
2012-04-01T18:35:37Z (10 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master
Children:
001307cf
Parents:
a2fa350
Message:

function for release data block (last) from extent, actually without releasing index blocks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/libext4_filesystem.c

    ra2fa350 r0d4db0f  
    783783        ext4_filesystem_t *fs = inode_ref->fs;
    784784
    785         /* TODO Handle extents */
    786 //      if (ext4_superblock_has_feature_incompatible(fs->superblock, EXT4_FEATURE_INCOMPAT_EXTENTS) &&
    787 //                      ext4_inode_has_flag(inode_ref->inode, EXT4_INODE_FLAG_EXTENTS)) {
    788 ////            rc = ext4_extent_find_block(fs, inode_ref, iblock, &current_block);
    789 ////
    790 ////            if (rc != EOK) {
    791 ////                    return rc;
    792 ////            }
    793 ////
    794 ////            *fblock = current_block;
    795 //
    796 //              // TODO release block from extents (and return fblock)
    797 //
    798 //              fblock = 0;
    799 //
    800 //              if (fblock == 0) {
    801 //                      return EOK;
    802 //              }
    803 //
    804 //              return ext4_balloc_free_block(fs, inode_ref, fblock);
    805 //
    806 //              return EOK;
    807 //
    808 //      }
    809 
    810 
     785        if (ext4_superblock_has_feature_incompatible(fs->superblock, EXT4_FEATURE_INCOMPAT_EXTENTS) &&
     786                        ext4_inode_has_flag(inode_ref->inode, EXT4_INODE_FLAG_EXTENTS)) {
     787
     788                return ext4_extent_release_block(inode_ref, iblock);
     789        }
    811790
    812791        ext4_inode_t *inode = inode_ref->inode;
Note: See TracChangeset for help on using the changeset viewer.