@@ -210,6 +210,7 @@ loop:
return -EROFS;
}
+ cur_trans->mount_opt = fs_info->mount_opt;
atomic_set(&cur_trans->num_writers, 1);
extwriter_counter_init(cur_trans, type);
init_waitqueue_head(&cur_trans->writer_wait);
@@ -52,6 +52,7 @@ struct btrfs_transaction {
struct list_head list;
struct extent_io_tree dirty_pages;
unsigned long start_time;
+ unsigned long mount_opt;
wait_queue_head_t writer_wait;
wait_queue_head_t commit_wait;
struct list_head pending_snapshots;
@@ -126,6 +127,9 @@ struct btrfs_pending_snapshot {
struct list_head list;
};
+#define btrfs_test_trans_opt(trans, opt) \
+ (btrfs_raw_test_opt(trans->transaction->mount_opt, opt))
+
static inline void btrfs_set_inode_last_trans(struct btrfs_trans_handle *trans,
struct inode *inode)
{