inode.c (d6b32bbb3eae3fb787f1c33bf9f767ca1ddeb208) | inode.c (13723d00e374c2a6d6ccb5af6de965e89c3e1b01) |
---|---|
1/* -*- mode: c; c-basic-offset: 8; -*- 2 * vim: noexpandtab sw=8 ts=8 sts=0: 3 * 4 * inode.c 5 * 6 * vfs' aops, fops, dops and iops 7 * 8 * Copyright (C) 2002, 2004 Oracle. All rights reserved. --- 523 unchanged lines hidden (view full) --- 532 533 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); 534 if (IS_ERR(handle)) { 535 status = PTR_ERR(handle); 536 mlog_errno(status); 537 goto out; 538 } 539 | 1/* -*- mode: c; c-basic-offset: 8; -*- 2 * vim: noexpandtab sw=8 ts=8 sts=0: 3 * 4 * inode.c 5 * 6 * vfs' aops, fops, dops and iops 7 * 8 * Copyright (C) 2002, 2004 Oracle. All rights reserved. --- 523 unchanged lines hidden (view full) --- 532 533 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); 534 if (IS_ERR(handle)) { 535 status = PTR_ERR(handle); 536 mlog_errno(status); 537 goto out; 538 } 539 |
540 status = ocfs2_journal_access(handle, inode, fe_bh, 541 OCFS2_JOURNAL_ACCESS_WRITE); | 540 status = ocfs2_journal_access_di(handle, inode, fe_bh, 541 OCFS2_JOURNAL_ACCESS_WRITE); |
542 if (status < 0) { 543 mlog_errno(status); 544 goto out; 545 } 546 547 i_size_write(inode, 0); 548 549 status = ocfs2_mark_inode_dirty(handle, inode, fe_bh); --- 66 unchanged lines hidden (view full) --- 616 status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, inode, 617 orphan_dir_bh); 618 if (status < 0) { 619 mlog_errno(status); 620 goto bail_commit; 621 } 622 623 /* set the inodes dtime */ | 542 if (status < 0) { 543 mlog_errno(status); 544 goto out; 545 } 546 547 i_size_write(inode, 0); 548 549 status = ocfs2_mark_inode_dirty(handle, inode, fe_bh); --- 66 unchanged lines hidden (view full) --- 616 status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, inode, 617 orphan_dir_bh); 618 if (status < 0) { 619 mlog_errno(status); 620 goto bail_commit; 621 } 622 623 /* set the inodes dtime */ |
624 status = ocfs2_journal_access(handle, inode, di_bh, 625 OCFS2_JOURNAL_ACCESS_WRITE); | 624 status = ocfs2_journal_access_di(handle, inode, di_bh, 625 OCFS2_JOURNAL_ACCESS_WRITE); |
626 if (status < 0) { 627 mlog_errno(status); 628 goto bail_commit; 629 } 630 631 di->i_dtime = cpu_to_le64(CURRENT_TIME.tv_sec); 632 di->i_flags &= cpu_to_le32(~(OCFS2_VALID_FL | OCFS2_ORPHANED_FL)); 633 --- 551 unchanged lines hidden (view full) --- 1185 struct buffer_head *bh) 1186{ 1187 int status; 1188 struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data; 1189 1190 mlog_entry("(inode %llu)\n", 1191 (unsigned long long)OCFS2_I(inode)->ip_blkno); 1192 | 626 if (status < 0) { 627 mlog_errno(status); 628 goto bail_commit; 629 } 630 631 di->i_dtime = cpu_to_le64(CURRENT_TIME.tv_sec); 632 di->i_flags &= cpu_to_le32(~(OCFS2_VALID_FL | OCFS2_ORPHANED_FL)); 633 --- 551 unchanged lines hidden (view full) --- 1185 struct buffer_head *bh) 1186{ 1187 int status; 1188 struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data; 1189 1190 mlog_entry("(inode %llu)\n", 1191 (unsigned long long)OCFS2_I(inode)->ip_blkno); 1192 |
1193 status = ocfs2_journal_access(handle, inode, bh, 1194 OCFS2_JOURNAL_ACCESS_WRITE); | 1193 status = ocfs2_journal_access_di(handle, inode, bh, 1194 OCFS2_JOURNAL_ACCESS_WRITE); |
1195 if (status < 0) { 1196 mlog_errno(status); 1197 goto leave; 1198 } 1199 1200 spin_lock(&OCFS2_I(inode)->ip_lock); 1201 fe->i_clusters = cpu_to_le32(OCFS2_I(inode)->ip_clusters); 1202 ocfs2_get_inode_flags(OCFS2_I(inode)); --- 69 unchanged lines hidden (view full) --- 1272 BUG_ON(!buffer_uptodate(bh)); 1273 1274 /* 1275 * If the ecc fails, we return the error but otherwise 1276 * leave the filesystem running. We know any error is 1277 * local to this block. 1278 */ 1279 rc = ocfs2_validate_meta_ecc(sb, bh->b_data, &di->i_check); | 1195 if (status < 0) { 1196 mlog_errno(status); 1197 goto leave; 1198 } 1199 1200 spin_lock(&OCFS2_I(inode)->ip_lock); 1201 fe->i_clusters = cpu_to_le32(OCFS2_I(inode)->ip_clusters); 1202 ocfs2_get_inode_flags(OCFS2_I(inode)); --- 69 unchanged lines hidden (view full) --- 1272 BUG_ON(!buffer_uptodate(bh)); 1273 1274 /* 1275 * If the ecc fails, we return the error but otherwise 1276 * leave the filesystem running. We know any error is 1277 * local to this block. 1278 */ 1279 rc = ocfs2_validate_meta_ecc(sb, bh->b_data, &di->i_check); |
1280 if (rc) | 1280 if (rc) { 1281 mlog(ML_ERROR, "Checksum failed for dinode %llu\n", 1282 (unsigned long long)bh->b_blocknr); |
1281 goto bail; | 1283 goto bail; |
1284 } |
|
1282 1283 /* 1284 * Errors after here are fatal. 1285 */ 1286 1287 rc = -EINVAL; 1288 1289 if (!OCFS2_IS_VALID_DINODE(di)) { --- 55 unchanged lines hidden --- | 1285 1286 /* 1287 * Errors after here are fatal. 1288 */ 1289 1290 rc = -EINVAL; 1291 1292 if (!OCFS2_IS_VALID_DINODE(di)) { --- 55 unchanged lines hidden --- |