File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -204,7 +204,8 @@ xfs_bud_item_release(
204204}
205205
206206static const struct xfs_item_ops xfs_bud_item_ops = {
207- .flags = XFS_ITEM_RELEASE_WHEN_COMMITTED ,
207+ .flags = XFS_ITEM_RELEASE_WHEN_COMMITTED |
208+ XFS_ITEM_INTENT_DONE ,
208209 .iop_size = xfs_bud_item_size ,
209210 .iop_format = xfs_bud_item_format ,
210211 .iop_release = xfs_bud_item_release ,
@@ -588,6 +589,7 @@ xfs_bui_item_relog(
588589}
589590
590591static const struct xfs_item_ops xfs_bui_item_ops = {
592+ .flags = XFS_ITEM_INTENT ,
591593 .iop_size = xfs_bui_item_size ,
592594 .iop_format = xfs_bui_item_format ,
593595 .iop_unpin = xfs_bui_item_unpin ,
Original file line number Diff line number Diff line change @@ -307,7 +307,8 @@ xfs_efd_item_release(
307307}
308308
309309static const struct xfs_item_ops xfs_efd_item_ops = {
310- .flags = XFS_ITEM_RELEASE_WHEN_COMMITTED ,
310+ .flags = XFS_ITEM_RELEASE_WHEN_COMMITTED |
311+ XFS_ITEM_INTENT_DONE ,
311312 .iop_size = xfs_efd_item_size ,
312313 .iop_format = xfs_efd_item_format ,
313314 .iop_release = xfs_efd_item_release ,
@@ -688,6 +689,7 @@ xfs_efi_item_relog(
688689}
689690
690691static const struct xfs_item_ops xfs_efi_item_ops = {
692+ .flags = XFS_ITEM_INTENT ,
691693 .iop_size = xfs_efi_item_size ,
692694 .iop_format = xfs_efi_item_format ,
693695 .iop_unpin = xfs_efi_item_unpin ,
Original file line number Diff line number Diff line change @@ -210,7 +210,8 @@ xfs_cud_item_release(
210210}
211211
212212static const struct xfs_item_ops xfs_cud_item_ops = {
213- .flags = XFS_ITEM_RELEASE_WHEN_COMMITTED ,
213+ .flags = XFS_ITEM_RELEASE_WHEN_COMMITTED |
214+ XFS_ITEM_INTENT_DONE ,
214215 .iop_size = xfs_cud_item_size ,
215216 .iop_format = xfs_cud_item_format ,
216217 .iop_release = xfs_cud_item_release ,
@@ -602,6 +603,7 @@ xfs_cui_item_relog(
602603}
603604
604605static const struct xfs_item_ops xfs_cui_item_ops = {
606+ .flags = XFS_ITEM_INTENT ,
605607 .iop_size = xfs_cui_item_size ,
606608 .iop_format = xfs_cui_item_format ,
607609 .iop_unpin = xfs_cui_item_unpin ,
Original file line number Diff line number Diff line change @@ -233,7 +233,8 @@ xfs_rud_item_release(
233233}
234234
235235static const struct xfs_item_ops xfs_rud_item_ops = {
236- .flags = XFS_ITEM_RELEASE_WHEN_COMMITTED ,
236+ .flags = XFS_ITEM_RELEASE_WHEN_COMMITTED |
237+ XFS_ITEM_INTENT_DONE ,
237238 .iop_size = xfs_rud_item_size ,
238239 .iop_format = xfs_rud_item_format ,
239240 .iop_release = xfs_rud_item_release ,
@@ -632,6 +633,7 @@ xfs_rui_item_relog(
632633}
633634
634635static const struct xfs_item_ops xfs_rui_item_ops = {
636+ .flags = XFS_ITEM_INTENT ,
635637 .iop_size = xfs_rui_item_size ,
636638 .iop_format = xfs_rui_item_format ,
637639 .iop_unpin = xfs_rui_item_unpin ,
Original file line number Diff line number Diff line change @@ -80,28 +80,29 @@ struct xfs_item_ops {
8080 struct xfs_trans * tp );
8181};
8282
83- /* Is this log item a deferred action intent? */
83+ /*
84+ * Log item ops flags
85+ */
86+ /*
87+ * Release the log item when the journal commits instead of inserting into the
88+ * AIL for writeback tracking and/or log tail pinning.
89+ */
90+ #define XFS_ITEM_RELEASE_WHEN_COMMITTED (1 << 0)
91+ #define XFS_ITEM_INTENT (1 << 1)
92+ #define XFS_ITEM_INTENT_DONE (1 << 2)
93+
8494static inline bool
8595xlog_item_is_intent (struct xfs_log_item * lip )
8696{
87- return lip -> li_ops -> iop_recover != NULL &&
88- lip -> li_ops -> iop_match != NULL ;
97+ return lip -> li_ops -> flags & XFS_ITEM_INTENT ;
8998}
9099
91- /* Is this a log intent-done item? */
92100static inline bool
93101xlog_item_is_intent_done (struct xfs_log_item * lip )
94102{
95- return lip -> li_ops -> iop_unpin == NULL &&
96- lip -> li_ops -> iop_push == NULL ;
103+ return lip -> li_ops -> flags & XFS_ITEM_INTENT_DONE ;
97104}
98105
99- /*
100- * Release the log item as soon as committed. This is for items just logging
101- * intents that never need to be written back in place.
102- */
103- #define XFS_ITEM_RELEASE_WHEN_COMMITTED (1 << 0)
104-
105106void xfs_log_item_init (struct xfs_mount * mp , struct xfs_log_item * item ,
106107 int type , const struct xfs_item_ops * ops );
107108
You can’t perform that action at this time.
0 commit comments