Re: [PATCH v2] xfs_db: update sector size when type is set

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

 



Hey Bill,

> diff --git a/db/io.c b/db/io.c
> index 9918a51..792cc0a 100644
> --- a/db/io.c
> +++ b/db/io.c
> @@ -615,7 +615,13 @@ set_iocur_type(
>  	const typ_t	*t)
>  {
>  	struct xfs_buf	*bp = iocur_top->bp;
> +	int bb_count;
>  
> +	/* adjust cursor for types that contain fields */
> +	if (t->fields) {
> +		bb_count = BTOBB(byteize(fsize(t->fields, iocur_top->data, 0, 0)));

Doesn't byteize() requires:

#include "bit.h"

?

I can't build xfsprogs with this patch without including bit.h

In file included from ../include/xfs.h:68:0,
                 from ../include/libxfs.h:24,
                 from io.c:19:
io.c: In function ‘set_iocur_type’:
io.c:600:20: warning: implicit declaration of function ‘byteize’
[-Wimplicit-function-declaration]
   bb_count = BTOBB(byteize(fsize(t->fields, iocur_top->data, 0, 0)));
                    ^


Although, after including it, the patch works fine, fixes the problem with
different sector sizes.

After fixing the include above, you can add:

Reviewed-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx>


Cheers


> +		set_cur(t, iocur_top->bb, bb_count, DB_RING_IGN, NULL);
> +	}
>  	iocur_top->typ = t;
>  
>  	/* verify the buffer if the type has one. */
> -- 
> 2.9.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux