On Thu, Feb 06, 2020 at 12:02:12PM +0000, Johannes Thumshirn wrote:
On 06/02/2020 11:44, Naohiro Aota wrote:
+/*
Nit: /**
Fixed.
+ * dev_extent_hole_check - check if specified hole is suitable for allocation
+ * @device: the device which we have the hole
+ * @hole_start: starting position of the hole
+ * @hole_size: the size of the hole
+ * @num_bytes: the size of the free space that we need
+ *
+ * This function may modify @hole_start and @hole_end to reflect the
+ * suitable position for allocation. Returns 1 if hole position is
+ * updated, 0 otherwise.
+ */
+static int dev_extent_hole_check(struct btrfs_device *device, u64 *hole_start,
+ u64 *hole_size, u64 num_bytes)
+{
+ int ret = 0;
+ u64 hole_end = *hole_start + *hole_size;
+
Couldn't this be bool?
Good point. I changed it to bool and also renamed "ret" to "changed"
to make it clear.
Thanks,
Thanks,
Johannes