inode->u.ext2_i.i_data[8], inode->u.ext2_i.i_data[9]);\
}
+#define ODEBUG(obdo) { \
+ printk("]]%s line %d[[ id %Ld, atm %Ld, mtim %Ld, ctm %Ld, size %Ld, blocks %Ld\n",\
+ __FUNCTION__ , __LINE__, \
+ obdo->o_ino, obdo->o_atime, obdo->o_mtime,\
+ obdo->o_ctime, obdo->o_size, obdo->o_blocks);\
+ printk("]]%s line %d[[ mode %o, uid %d, gid %d, flg %0x, obdflg %0x, nlnk %d, valid %0x\n", \
+ __FUNCTION__ , __LINE__, \
+ obdo->o_mode, obdo->o_uid, obdo->o_gid,\
+ obdo->o_flags, obdo->o_obdflags, obdo->o_nlink,\
+ obdo->o_valid);\
+ printk("blk: %d %d %d %d %d %d %d %d %d %d\n",\
+ ((long)obdo->o_inline)[0], ((long)obdo->o_inline)[1],\
+ ((long)obdo->o_inline)[2], ((long)obdo->o_inline)[3],\
+ ((long)obdo->o_inline)[4], ((long)obdo->o_inline)[5],\
+ ((long)obdo->o_inline)[6], ((long)obdo->o_inline)[7],\
+ ((long)obdo->o_inline)[8], ((long)obdo->o_inline)[9]);\
+ }
+
#define PDEBUG(page,cmd) {if (page){\
char *uptodate = (Page_Uptodate(page)) ? "yes" : "no";\
return -EBUSY;
}
+ ENTRY;
/* get data structures */
err = copy_from_user(&input, (void *)arg, sizeof(input));
if ( err ) {
return err;
}
+ ENTRY;
err = getdata(input->att_typelen + 1, &input->att_type);
if ( err ) {
EXIT;
return err;
}
+ ENTRY;
/* find the type */
type = obd_nm_to_type(input->att_type);
OBD_FREE(input->att_type, input->att_typelen + 1);
use IO::Handle;
-# NOTE long long are layed out in memory as follows:
+# NOTE long long are layed out in ia32 memory as follows:
# u = 0xaaaabbbbccccdddd has ccccdddd at &u and aaaabbbb 4 bytes on
# this may be different on other architectures
-# we use 32 bit integers for all 64 quantities in this program
-# #define OBD_INLINESZ 60
+# we use 32-bit integers for all 64-bit quantities in this program
+# #define OBD_INLINESZ 64
# #define OBD_OBDMDSZ 64
# /* Note: 64-bit types are 64-bit aligned in structure */
# struct obdo {
sub obdo_pack {
my $obdo = shift;
- pack "LL LL LL LL LL LL LL L L L L L L L L 60c 64c L L L",
+ pack "LL LL LL LL LL LL LL L L L L L L L L a60 a64 L L L",
$obdo->{id}, 0,
$obdo->{gr}, 0,
$obdo->{atime}, 0,
$obdo->{mode},
$obdo->{uid},
$obdo->{gid},
- $obdo->{flag},
- $obdo->{obdoflags},
+ $obdo->{flags},
+ $obdo->{obdflags},
$obdo->{nlink},
$obdo->{valid},
$obdo->{inline},
$obdo->{mode},
$obdo->{uid},
$obdo->{gid},
- $obdo->{flag},
- $obdo->{obdoflags},
+ $obdo->{flags},
+ $obdo->{obdflags},
$obdo->{nlink},
$obdo->{valid},
$obdo->{inline},
- $obdo->{obdmd}) = unpack $offset . "xL4x L4x L4x L4x L4x L4x L4x L L L L L L L L 60c 64c", $buf;
+ $obdo->{obdmd}) = unpack "x${offset}Lx4 Lx4 Lx4 Lx4 Lx4 Lx4 Lx4 L L L L L L L L a60 a64", $buf;
+ $obdo;
}
sub obdo_print {
- printf "id: %d\ngrp: %d\natime: %s\natime: %s\nmtime: %s\nctime: %s\nsize: %d\nblocks: %d\nblksize: %d\nmode: %x\nuid: %d\ngid: %d\nflag: %x\nobdflag: %x\nnlink: %d\nvalid: %x\ninline: %s\obdmd: %s\n",
- $obdo->{id},
+ my $obdo = shift;
+
+ printf "id: %d\ngrp: %d\natime: %s\nmtime: %s\nctime: %s\nsize: %d\nblocks: %d\nblksize: %d\nmode: %x\nuid: %d\ngid: %d\nflags: %x\nobdflags: %x\nnlink: %d\nvalid: %x\ninline: %s\nobdmd: %s\n",
+ $obdo->{id},
$obdo->{gr},
$obdo->{atime},
$obdo->{mtime},
$obdo->{mode},
$obdo->{uid},
$obdo->{gid},
- $obdo->{flag},
- $obdo->{obdoflags},
+ $obdo->{flags},
+ $obdo->{obdflags},
$obdo->{nlink},
$obdo->{valid},
$obdo->{inline},
}
-# XXXXXXXXXXXXXXXXXX
-# test here
-
- $obdo->{id}= 1;
- $obdo->{gr}= 2;
- $obdo->{atime}= 3;
- $obdo->{mtime}= 4;
- $obdo->{ctime}= 5;
- $obdo->{size}= 6;
- $obdo->{blocks}= 7;
- $obdo->{blksize}= 8;
- $obdo->{mode}= 9;
- $obdo->{uid}= 10;
- $obdo->{gid}= 11;
- $obdo->{flag}= 12;
- $obdo->{obdoflags}= ;
- $obdo->{nlink}= ;
- $obdo->{valid}= ;
- $obdo->{inline}= ;
- $obdo->{obdmd};
-
-# print, pack and unpack and print
-
-print "XXXXXXXX testing done\n";
-exit;
-
-
my ($file);
GetOptions("f!" => \$file, "device=s" => \$::device, ) || die "Getoptions";