[klibc] [PATCH] btrfs support

Benjamin Cama benoar at free.fr
Sat Apr 3 14:01:02 PDT 2010


Hi,

Le samedi 03 avril 2010 à 22:11 +0200, maximilian attems a écrit :
> already done, is in my patch queue to hpa, see
> http://git.debian.org/?p=users/maks/klibc.git;a=summary

Argh ... missed it. I only looked at the official tree and didn't see
anything. Furthermore, it was on my TODO list for months, and I decided
to get it done today ...

> > +#define BTRFS_CSUM_SIZE 32
> > +#define BTRFS_FSID_SIZE 16
> 
> ok hadn't given those naming, could be done in followup patch.

I tried to follow "upstream" as much as possible, letting every comment
in place, etc. I think it's clearer to indicate that this code is only
copy and paste, and to indicate from where it comes. Hence my remark at
the top indicating it comes from fs/btrfs/ctree.h.

> > +
> > +	if (!memcmp(&sb->magic, BTRFS_MAGIC, sizeof(BTRFS_MAGIC)-1)) {
> > +		*bytes = (unsigned long long)__le64_to_cpu(sb->total_bytes);
> > +		return 1;
> > +	}
> 
> why the le64_to_cpu call ?

Well, so that the size is correctly read regarding the endianness ?...
Or I didn't understand your question.

Regards,
benjamin



More information about the klibc mailing list