浏览代码

Btrfs: return keys for large items to the search ioctl

The search ioctl was skipping large items entirely (ones that are too
big for the results buffer).  This changes things to at least copy
the item header so that we can send information about the item back to
userland.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Chris Mason 15 年之前
父节点
当前提交
90fdde147f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/btrfs/ioctl.c

+ 1 - 1
fs/btrfs/ioctl.c

@@ -997,8 +997,8 @@ static noinline int copy_to_sk(struct btrfs_root *root,
 			read_extent_buffer(leaf, p,
 			read_extent_buffer(leaf, p,
 					   item_off, item_len);
 					   item_off, item_len);
 			*sk_offset += item_len;
 			*sk_offset += item_len;
-			found++;
 		}
 		}
+		found++;
 
 
 		if (*num_found >= sk->nr_items)
 		if (*num_found >= sk->nr_items)
 			break;
 			break;