diff options
author | George Wang <xuw2015@gmail.com> | 2015-04-20 13:33:16 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2015-04-24 15:41:59 +0200 |
commit | fb399a13013889c9dc91ba75d4d6ce549500d2f2 (patch) | |
tree | 5a71493db9525a4be93ae45064e860151742705d /free-space-cache.c | |
parent | 49eab991720a1dbeaffade98fb946f6a22848867 (diff) |
btrfs-progs: fix btrfs quota rescan failed on PPC64 arch
PPC64 arch use such following IOC values "
\#define _IOC_NONE 1U
\#define _IOC_READ 2U
\#define _IOC_WRITE 4U
" comparing to the default IOC values "
\#define _IOC_NONE 0U
\#define _IOC_READ 2U
\#define _IOC_WRITE 1U"
This means the value "_IOW*" will be negative when we store it in the int
variables. Such as the "BTRFS_IOC_QGROUP_CREATE", it will be "0x4010942e" on
X86_64, but "0x8010942e" on PPC64.
Notice that the IOC values are the "unsigned long" type, so we use the
"unsigned long" to store it, and this can insure the comparison between the
variable and BTRFS_IOC_* valid.
Signed-off-by: George Wang <xuw2015@gmail.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
[manpage states that it's int, kernel uses unsigned int, glibc wants
unsigned long int]
Tested-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'free-space-cache.c')
0 files changed, 0 insertions, 0 deletions