quota_local.c (df32b3343aa11e0c7f54783594b24321d17d376f) | quota_local.c (13723d00e374c2a6d6ccb5af6de965e89c3e1b01) |
---|---|
1/* 2 * Implementation of operations over local quota file 3 */ 4 5#include <linux/fs.h> 6#include <linux/quota.h> 7#include <linux/quotaops.h> 8#include <linux/module.h> --- 92 unchanged lines hidden (view full) --- 101 int status; 102 103 handle = ocfs2_start_trans(OCFS2_SB(sb), 1); 104 if (IS_ERR(handle)) { 105 status = PTR_ERR(handle); 106 mlog_errno(status); 107 return status; 108 } | 1/* 2 * Implementation of operations over local quota file 3 */ 4 5#include <linux/fs.h> 6#include <linux/quota.h> 7#include <linux/quotaops.h> 8#include <linux/module.h> --- 92 unchanged lines hidden (view full) --- 101 int status; 102 103 handle = ocfs2_start_trans(OCFS2_SB(sb), 1); 104 if (IS_ERR(handle)) { 105 status = PTR_ERR(handle); 106 mlog_errno(status); 107 return status; 108 } |
109 status = ocfs2_journal_access(handle, inode, bh, 110 OCFS2_JOURNAL_ACCESS_WRITE); | 109 status = ocfs2_journal_access_dq(handle, inode, bh, 110 OCFS2_JOURNAL_ACCESS_WRITE); |
111 if (status < 0) { 112 mlog_errno(status); 113 ocfs2_commit_trans(OCFS2_SB(sb), handle); 114 return status; 115 } 116 lock_buffer(bh); 117 modify(bh, private); 118 unlock_buffer(bh); --- 382 unchanged lines hidden (view full) --- 501 * node. Since we have our own reference we know 502 * global structure actually won't be freed. */ 503 status = ocfs2_global_release_dquot(dquot); 504 if (status < 0) { 505 mlog_errno(status); 506 goto out_commit; 507 } 508 /* Release local quota file entry */ | 111 if (status < 0) { 112 mlog_errno(status); 113 ocfs2_commit_trans(OCFS2_SB(sb), handle); 114 return status; 115 } 116 lock_buffer(bh); 117 modify(bh, private); 118 unlock_buffer(bh); --- 382 unchanged lines hidden (view full) --- 501 * node. Since we have our own reference we know 502 * global structure actually won't be freed. */ 503 status = ocfs2_global_release_dquot(dquot); 504 if (status < 0) { 505 mlog_errno(status); 506 goto out_commit; 507 } 508 /* Release local quota file entry */ |
509 status = ocfs2_journal_access(handle, lqinode, | 509 status = ocfs2_journal_access_dq(handle, lqinode, |
510 qbh, OCFS2_JOURNAL_ACCESS_WRITE); 511 if (status < 0) { 512 mlog_errno(status); 513 goto out_commit; 514 } 515 lock_buffer(qbh); 516 WARN_ON(!ocfs2_test_bit(bit, dchunk->dqc_bitmap)); 517 ocfs2_clear_bit(bit, dchunk->dqc_bitmap); --- 91 unchanged lines hidden (view full) --- 609 /* Mark quota file as clean if we are recovering quota file of 610 * some other node. */ 611 handle = ocfs2_start_trans(osb, 1); 612 if (IS_ERR(handle)) { 613 status = PTR_ERR(handle); 614 mlog_errno(status); 615 goto out_bh; 616 } | 510 qbh, OCFS2_JOURNAL_ACCESS_WRITE); 511 if (status < 0) { 512 mlog_errno(status); 513 goto out_commit; 514 } 515 lock_buffer(qbh); 516 WARN_ON(!ocfs2_test_bit(bit, dchunk->dqc_bitmap)); 517 ocfs2_clear_bit(bit, dchunk->dqc_bitmap); --- 91 unchanged lines hidden (view full) --- 609 /* Mark quota file as clean if we are recovering quota file of 610 * some other node. */ 611 handle = ocfs2_start_trans(osb, 1); 612 if (IS_ERR(handle)) { 613 status = PTR_ERR(handle); 614 mlog_errno(status); 615 goto out_bh; 616 } |
617 status = ocfs2_journal_access(handle, lqinode, bh, 618 OCFS2_JOURNAL_ACCESS_WRITE); | 617 status = ocfs2_journal_access_dq(handle, lqinode, bh, 618 OCFS2_JOURNAL_ACCESS_WRITE); |
619 if (status < 0) { 620 mlog_errno(status); 621 goto out_trans; 622 } 623 lock_buffer(bh); 624 ldinfo->dqi_flags = cpu_to_le32(flags | OLQF_CLEAN); 625 unlock_buffer(bh); 626 status = ocfs2_journal_dirty(handle, bh); --- 349 unchanged lines hidden (view full) --- 976 977 handle = ocfs2_start_trans(OCFS2_SB(sb), 2); 978 if (IS_ERR(handle)) { 979 status = PTR_ERR(handle); 980 mlog_errno(status); 981 goto out; 982 } 983 | 619 if (status < 0) { 620 mlog_errno(status); 621 goto out_trans; 622 } 623 lock_buffer(bh); 624 ldinfo->dqi_flags = cpu_to_le32(flags | OLQF_CLEAN); 625 unlock_buffer(bh); 626 status = ocfs2_journal_dirty(handle, bh); --- 349 unchanged lines hidden (view full) --- 976 977 handle = ocfs2_start_trans(OCFS2_SB(sb), 2); 978 if (IS_ERR(handle)) { 979 status = PTR_ERR(handle); 980 mlog_errno(status); 981 goto out; 982 } 983 |
984 status = ocfs2_journal_access(handle, lqinode, bh, 985 OCFS2_JOURNAL_ACCESS_WRITE); | 984 status = ocfs2_journal_access_dq(handle, lqinode, bh, 985 OCFS2_JOURNAL_ACCESS_WRITE); |
986 if (status < 0) { 987 mlog_errno(status); 988 goto out_trans; 989 } 990 lock_buffer(bh); 991 dchunk->dqc_free = cpu_to_le32(ol_quota_entries_per_block(sb)); 992 memset(dchunk->dqc_bitmap, 0, 993 sb->s_blocksize - sizeof(struct ocfs2_local_disk_chunk) - --- 75 unchanged lines hidden (view full) --- 1069 goto out; 1070 } 1071 handle = ocfs2_start_trans(OCFS2_SB(sb), 2); 1072 if (IS_ERR(handle)) { 1073 status = PTR_ERR(handle); 1074 mlog_errno(status); 1075 goto out; 1076 } | 986 if (status < 0) { 987 mlog_errno(status); 988 goto out_trans; 989 } 990 lock_buffer(bh); 991 dchunk->dqc_free = cpu_to_le32(ol_quota_entries_per_block(sb)); 992 memset(dchunk->dqc_bitmap, 0, 993 sb->s_blocksize - sizeof(struct ocfs2_local_disk_chunk) - --- 75 unchanged lines hidden (view full) --- 1069 goto out; 1070 } 1071 handle = ocfs2_start_trans(OCFS2_SB(sb), 2); 1072 if (IS_ERR(handle)) { 1073 status = PTR_ERR(handle); 1074 mlog_errno(status); 1075 goto out; 1076 } |
1077 status = ocfs2_journal_access(handle, lqinode, chunk->qc_headerbh, | 1077 status = ocfs2_journal_access_dq(handle, lqinode, chunk->qc_headerbh, |
1078 OCFS2_JOURNAL_ACCESS_WRITE); 1079 if (status < 0) { 1080 mlog_errno(status); 1081 goto out_trans; 1082 } 1083 1084 dchunk = (struct ocfs2_local_disk_chunk *)chunk->qc_headerbh->b_data; 1085 lock_buffer(chunk->qc_headerbh); --- 116 unchanged lines hidden (view full) --- 1202 BUG_ON(!handle); 1203 /* First write all local changes to global file */ 1204 status = ocfs2_global_release_dquot(dquot); 1205 if (status < 0) { 1206 mlog_errno(status); 1207 goto out; 1208 } 1209 | 1078 OCFS2_JOURNAL_ACCESS_WRITE); 1079 if (status < 0) { 1080 mlog_errno(status); 1081 goto out_trans; 1082 } 1083 1084 dchunk = (struct ocfs2_local_disk_chunk *)chunk->qc_headerbh->b_data; 1085 lock_buffer(chunk->qc_headerbh); --- 116 unchanged lines hidden (view full) --- 1202 BUG_ON(!handle); 1203 /* First write all local changes to global file */ 1204 status = ocfs2_global_release_dquot(dquot); 1205 if (status < 0) { 1206 mlog_errno(status); 1207 goto out; 1208 } 1209 |
1210 status = ocfs2_journal_access(handle, sb_dqopt(sb)->files[type], | 1210 status = ocfs2_journal_access_dq(handle, sb_dqopt(sb)->files[type], |
1211 od->dq_chunk->qc_headerbh, OCFS2_JOURNAL_ACCESS_WRITE); 1212 if (status < 0) { 1213 mlog_errno(status); 1214 goto out; 1215 } 1216 offset = ol_dqblk_chunk_off(sb, od->dq_chunk->qc_num, 1217 od->dq_local_off); 1218 dchunk = (struct ocfs2_local_disk_chunk *) --- 35 unchanged lines hidden --- | 1211 od->dq_chunk->qc_headerbh, OCFS2_JOURNAL_ACCESS_WRITE); 1212 if (status < 0) { 1213 mlog_errno(status); 1214 goto out; 1215 } 1216 offset = ol_dqblk_chunk_off(sb, od->dq_chunk->qc_num, 1217 od->dq_local_off); 1218 dchunk = (struct ocfs2_local_disk_chunk *) --- 35 unchanged lines hidden --- |