extents.c (3d5271f9883cba7b54762bc4fe027d4172f06db7) | extents.c (634725a92938b0f282b17cec0b007dca77adebd2) |
---|---|
1/* 2 * linux/fs/hfsplus/extents.c 3 * 4 * Copyright (C) 2001 5 * Brad Boyer (flar@allandria.com) 6 * (C) 2003 Ardis Technologies <roman@ardistech.com> 7 * 8 * Handling of Extents both in catalog and extents overflow trees --- 335 unchanged lines hidden (view full) --- 344int hfsplus_file_extend(struct inode *inode) 345{ 346 struct super_block *sb = inode->i_sb; 347 u32 start, len, goal; 348 int res; 349 350 if (HFSPLUS_SB(sb).alloc_file->i_size * 8 < HFSPLUS_SB(sb).total_blocks - HFSPLUS_SB(sb).free_blocks + 8) { 351 // extend alloc file | 1/* 2 * linux/fs/hfsplus/extents.c 3 * 4 * Copyright (C) 2001 5 * Brad Boyer (flar@allandria.com) 6 * (C) 2003 Ardis Technologies <roman@ardistech.com> 7 * 8 * Handling of Extents both in catalog and extents overflow trees --- 335 unchanged lines hidden (view full) --- 344int hfsplus_file_extend(struct inode *inode) 345{ 346 struct super_block *sb = inode->i_sb; 347 u32 start, len, goal; 348 int res; 349 350 if (HFSPLUS_SB(sb).alloc_file->i_size * 8 < HFSPLUS_SB(sb).total_blocks - HFSPLUS_SB(sb).free_blocks + 8) { 351 // extend alloc file |
352 printk("extend alloc file! (%Lu,%u,%u)\n", HFSPLUS_SB(sb).alloc_file->i_size * 8, | 352 printk(KERN_ERR "hfs: extend alloc file! (%Lu,%u,%u)\n", HFSPLUS_SB(sb).alloc_file->i_size * 8, |
353 HFSPLUS_SB(sb).total_blocks, HFSPLUS_SB(sb).free_blocks); 354 return -ENOSPC; | 353 HFSPLUS_SB(sb).total_blocks, HFSPLUS_SB(sb).free_blocks); 354 return -ENOSPC; |
355 //BUG(); | |
356 } 357 358 down(&HFSPLUS_I(inode).extents_lock); 359 if (HFSPLUS_I(inode).alloc_blocks == HFSPLUS_I(inode).first_blocks) 360 goal = hfsplus_ext_lastblock(HFSPLUS_I(inode).first_extents); 361 else { 362 res = hfsplus_ext_read_extent(inode, HFSPLUS_I(inode).alloc_blocks); 363 if (res) --- 143 unchanged lines hidden --- | 355 } 356 357 down(&HFSPLUS_I(inode).extents_lock); 358 if (HFSPLUS_I(inode).alloc_blocks == HFSPLUS_I(inode).first_blocks) 359 goal = hfsplus_ext_lastblock(HFSPLUS_I(inode).first_extents); 360 else { 361 res = hfsplus_ext_read_extent(inode, HFSPLUS_I(inode).alloc_blocks); 362 if (res) --- 143 unchanged lines hidden --- |