diff options
author | David Sterba <dsterba@suse.com> | 2016-10-31 12:04:55 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-11-09 13:47:29 +0100 |
commit | 37bc144172cddb9623c1bf316650a3cbeb4ef9b5 (patch) | |
tree | 736871963e9aaaa6041e63b9eab371e0fe530ffb /btrfs-list.c | |
parent | f52b559873f79b65515090da0b07e8260f4267a4 (diff) |
btrfs-progs: subvol list: remove useless comments
The search ioctl follows a well known usage pattern.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'btrfs-list.c')
-rw-r--r-- | btrfs-list.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/btrfs-list.c b/btrfs-list.c index 4a2476b7..1cf3be80 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -979,32 +979,21 @@ static int list_subvol_search(int fd, struct root_lookup *root_lookup) memset(&args, 0, sizeof(args)); sk->tree_id = BTRFS_ROOT_TREE_OBJECTID; - - /* - * set the min and max to backref keys. The search will - * only send back this type of key now. - */ + /* Search both live and deleted subvolumes */ sk->max_type = BTRFS_ROOT_BACKREF_KEY; sk->min_type = BTRFS_ROOT_ITEM_KEY; sk->min_objectid = BTRFS_FIRST_FREE_OBJECTID; - /* - * set all the other params to the max, we'll take any objectid - * and any trans - */ sk->max_objectid = BTRFS_LAST_FREE_OBJECTID; sk->max_offset = (u64)-1; sk->max_transid = (u64)-1; - - /* just a big number, doesn't matter much */ sk->nr_items = 4096; while(1) { ret = ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args); if (ret < 0) return ret; - /* the ioctl returns the number of item it found in nr_items */ if (sk->nr_items == 0) break; @@ -1052,17 +1041,13 @@ static int list_subvol_search(int fd, struct root_lookup *root_lookup) off += sh.len; - /* - * record the mins in sk so we can make sure the - * next search doesn't repeat this root - */ sk->min_objectid = sh.objectid; sk->min_type = sh.type; sk->min_offset = sh.offset; } sk->nr_items = 4096; sk->min_offset++; - if (!sk->min_offset) /* overflow */ + if (!sk->min_offset) sk->min_type++; else continue; |