Changes in uspace/srv/fs/mfs/mfs_rw.c [36cb22f:7a46bfe] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/mfs/mfs_rw.c
r36cb22f r7a46bfe 31 31 */ 32 32 33 #include <align.h>34 33 #include "mfs.h" 35 34 … … 54 53 *bytes, this function returns the on-disk block 55 54 *relative to that position. 56 * 57 * @param b Pointer to a 32bit number where the block number will be stored 58 * @param mnode Pointer to a generic MINIX inode in memory. 59 * @param pos Position in file. 60 * 61 * @return EOK on success or a negative error code. 55 *Returns zero if the block does not exist. 62 56 */ 63 57 int … … 71 65 int rblock = pos / block_size; 72 66 73 if ( ROUND_UP(mnode->ino_i->i_size, sbi->block_size)< pos) {67 if (mnode->ino_i->i_size < pos) { 74 68 /*Trying to read beyond the end of file*/ 75 69 r = EOK; … … 233 227 } 234 228 235 /**Free unused indirect zones from a MINIX inode according to it's new size. 236 * 237 * @param mnode Pointer to a generic MINIX inode in memory. 238 * @param new_size The new size of the inode. 239 * 240 * @return EOK on success or a negative error code. 241 */ 229 /*Free unused indirect zones*/ 242 230 int 243 231 mfs_prune_ind_zones(struct mfs_node *mnode, size_t new_size) … … 251 239 mfs_version_t fs_version = sbi->fs_version; 252 240 253 assert(new_size <= ino_i->i_size);254 255 241 if (fs_version == MFS_VERSION_V1) { 256 242 nr_direct = V1_NR_DIRECT_ZONES;
Note:
See TracChangeset
for help on using the changeset viewer.