inode.c (32a8f24dd75c2be34606e77414afba7bc6b5b366) | inode.c (af793295bf9ee92660f5e77d337b0493cea3f9b9) |
---|---|
1/* 2 * inode.c 3 * 4 * PURPOSE 5 * Inode handling routines for the OSTA-UDF(tm) filesystem. 6 * 7 * COPYRIGHT 8 * This file is distributed under the terms of the GNU General Public --- 205 unchanged lines hidden (view full) --- 214 int newblock; 215 struct buffer_head *dbh = NULL; 216 kernel_lb_addr eloc; 217 uint32_t elen; 218 uint8_t alloctype; 219 struct extent_position epos; 220 221 struct udf_fileident_bh sfibh, dfibh; | 1/* 2 * inode.c 3 * 4 * PURPOSE 5 * Inode handling routines for the OSTA-UDF(tm) filesystem. 6 * 7 * COPYRIGHT 8 * This file is distributed under the terms of the GNU General Public --- 205 unchanged lines hidden (view full) --- 214 int newblock; 215 struct buffer_head *dbh = NULL; 216 kernel_lb_addr eloc; 217 uint32_t elen; 218 uint8_t alloctype; 219 struct extent_position epos; 220 221 struct udf_fileident_bh sfibh, dfibh; |
222 loff_t f_pos = udf_ext0_offset(inode) >> 2; 223 int size = (udf_ext0_offset(inode) + inode->i_size) >> 2; | 222 loff_t f_pos = udf_ext0_offset(inode); 223 int size = udf_ext0_offset(inode) + inode->i_size; |
224 struct fileIdentDesc cfi, *sfi, *dfi; 225 struct udf_inode_info *iinfo = UDF_I(inode); 226 227 if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_SHORT_AD)) 228 alloctype = ICBTAG_FLAG_AD_SHORT; 229 else 230 alloctype = ICBTAG_FLAG_AD_LONG; 231 --- 19 unchanged lines hidden (view full) --- 251 return NULL; 252 lock_buffer(dbh); 253 memset(dbh->b_data, 0x00, inode->i_sb->s_blocksize); 254 set_buffer_uptodate(dbh); 255 unlock_buffer(dbh); 256 mark_buffer_dirty_inode(dbh, inode); 257 258 sfibh.soffset = sfibh.eoffset = | 224 struct fileIdentDesc cfi, *sfi, *dfi; 225 struct udf_inode_info *iinfo = UDF_I(inode); 226 227 if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_SHORT_AD)) 228 alloctype = ICBTAG_FLAG_AD_SHORT; 229 else 230 alloctype = ICBTAG_FLAG_AD_LONG; 231 --- 19 unchanged lines hidden (view full) --- 251 return NULL; 252 lock_buffer(dbh); 253 memset(dbh->b_data, 0x00, inode->i_sb->s_blocksize); 254 set_buffer_uptodate(dbh); 255 unlock_buffer(dbh); 256 mark_buffer_dirty_inode(dbh, inode); 257 258 sfibh.soffset = sfibh.eoffset = |
259 (f_pos & ((inode->i_sb->s_blocksize - 1) >> 2)) << 2; | 259 f_pos & (inode->i_sb->s_blocksize - 1); |
260 sfibh.sbh = sfibh.ebh = NULL; 261 dfibh.soffset = dfibh.eoffset = 0; 262 dfibh.sbh = dfibh.ebh = dbh; | 260 sfibh.sbh = sfibh.ebh = NULL; 261 dfibh.soffset = dfibh.eoffset = 0; 262 dfibh.sbh = dfibh.ebh = dbh; |
263 while ((f_pos < size)) { | 263 while (f_pos < size) { |
264 iinfo->i_alloc_type = ICBTAG_FLAG_AD_IN_ICB; 265 sfi = udf_fileident_read(inode, &f_pos, &sfibh, &cfi, NULL, 266 NULL, NULL, NULL); 267 if (!sfi) { 268 brelse(dbh); 269 return NULL; 270 } 271 iinfo->i_alloc_type = alloctype; --- 1876 unchanged lines hidden --- | 264 iinfo->i_alloc_type = ICBTAG_FLAG_AD_IN_ICB; 265 sfi = udf_fileident_read(inode, &f_pos, &sfibh, &cfi, NULL, 266 NULL, NULL, NULL); 267 if (!sfi) { 268 brelse(dbh); 269 return NULL; 270 } 271 iinfo->i_alloc_type = alloctype; --- 1876 unchanged lines hidden --- |