[PATCH 5/6] reiser4: blocknrlist: add operations blocknr_list_del() and blocknr_list_update_extent().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Ivan Shapovalov <intelfx100@xxxxxxxxx>
---
 fs/reiser4/blocknrlist.c | 28 ++++++++++++++++++++++++++++
 fs/reiser4/txnmgr.h      |  4 ++++
 2 files changed, 32 insertions(+)

diff --git a/fs/reiser4/blocknrlist.c b/fs/reiser4/blocknrlist.c
index 806c59d..4f80a53 100644
--- a/fs/reiser4/blocknrlist.c
+++ b/fs/reiser4/blocknrlist.c
@@ -243,6 +243,17 @@ void blocknr_list_sort_and_join(struct list_head *blist)
 	}
 }
 
+void blocknr_list_del(struct list_head *blist)
+{
+	struct blocknr_list_entry *entry;
+
+	assert("intelfx-72", blist != NULL);
+
+	entry = blocknr_list_entry(blist);
+	list_del_init (blist);
+	blocknr_list_entry_free(entry);
+}
+
 int blocknr_list_add_extent(txn_atom *atom,
                             struct list_head *blist,
                             blocknr_list_entry **new_entry,
@@ -287,6 +298,23 @@ int blocknr_list_add_extent(txn_atom *atom,
 	return 0;
 }
 
+void blocknr_list_update_extent(struct list_head *blist,
+                                const reiser4_block_nr *start,
+                                const reiser4_block_nr *len)
+{
+	blocknr_list_entry *entry;
+
+	assert("intelfx-73", blist != NULL);
+
+	entry = blocknr_list_entry(blist);
+	if (start != NULL) {
+		entry->start = *start;
+	}
+	if (len != NULL) {
+		entry->len = *len;
+	}
+}
+
 int blocknr_list_iterator(txn_atom *atom,
                           struct list_head *blist,
                           blocknr_set_actor_f actor,
diff --git a/fs/reiser4/txnmgr.h b/fs/reiser4/txnmgr.h
index 0350e8f..d2b8e95 100644
--- a/fs/reiser4/txnmgr.h
+++ b/fs/reiser4/txnmgr.h
@@ -509,6 +509,7 @@ extern void blocknr_list_init(struct list_head *blist);
 extern void blocknr_list_destroy(struct list_head *blist);
 extern void blocknr_list_merge(struct list_head *from, struct list_head *to);
 extern void blocknr_list_sort_and_join(struct list_head *blist);
+extern void blocknr_list_del(struct list_head *blist);
 extern reiser4_block_nr blocknr_list_entry_start(struct list_head *blist);
 extern reiser4_block_nr blocknr_list_entry_len(struct list_head *blist);
 /**
@@ -519,6 +520,9 @@ extern int blocknr_list_add_extent(txn_atom *atom,
                                    blocknr_list_entry **new_entry,
                                    const reiser4_block_nr *start,
                                    const reiser4_block_nr *len);
+extern void blocknr_list_update_extent(struct list_head *blist,
+                                       const reiser4_block_nr *start,
+                                       const reiser4_block_nr *len);
 extern int blocknr_list_iterator(txn_atom *atom,
                                  struct list_head *blist,
                                  blocknr_set_actor_f actor,
-- 
2.1.3

--
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux File System Development]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Resources]

  Powered by Linux