#include <linux/malloc.h>
#include <linux/vmalloc.h>
-#define SIM_OBD_DEBUG
+#define EXT2_OBD_DEBUG
#define MIN(a,b) (((a)<(b)) ? (a): (b))
/* debugging masks */
#define D_PSDEV 1 /* debug information from psdev.c */
#define D_INODE 2
-#define D_UNUSED2 4
-#define D_UNUSED3 8
+#define D_SUPER 4
+#define D_SNAP 8
#define D_UNUSED4 16
#define D_WARNING 32 /* misc warnings */
#define D_EXT2 64 /* anything from ext2_debug */
#define D_INFO 512 /* general information, especially from interface.c */
#define D_IOCTL 1024 /* ioctl related information */
#define D_BLOCKS 2048 /* ext2 block allocation */
+#define D_RPC 4096 /* ext2 block allocation */
-#ifdef SIM_OBD_DEBUG
+#ifdef EXT2_OBD_DEBUG
#define CDEBUG(mask, format, a...) \
do { \
if (obd_debug_level & mask) { \
if (obd_print_entry) \
printk("Process %d leaving %s [%d]\n", current->pid, __FUNCTION__, __LINE__)
-#else /* SIM_OBD_DEBUG */
+#else /* EXT2_OBD_DEBUG */
# define CDEBUG ;
# define ENTRY ;
# define EXIT ;
-#endif /* SIM_OBD_DEBUG */
+#endif /* EXT2_OBD_DEBUG */
#define CMD(cmd) (( cmd == READ ) ? "read" : "write")
char *uptodate = (Page_Uptodate(page)) ? "yes" : "no";\
char *locked = (PageLocked(page)) ? "yes" : "no";\
int count = page->count.counter;\
- long offset = page->offset;\
+ long index = page->index;\
\
CDEBUG(D_IOCTL, " ** %s, cmd: %s, off %ld, uptodate: %s, "\
"locked: %s, cnt %d page %p pages %ld** \n", __FUNCTION__,\
- cmd, offset, uptodate, locked, count, page, page->mapping->nrpages);\
+ cmd, index, uptodate, locked, count, page, (!page->mapping) ? -1 : page->mapping->nrpages);\
} else { CDEBUG(D_IOCTL, "** %s, no page\n", __FUNCTION__); }}
dest->i_flags = src->i_flags;
/* allocation of space */
dest->i_blocks = src->i_blocks;
-
- if ( !dest->i_blocks)
- memcpy(&dest->u, &src->u, sizeof(src->u));
+ if ( !dest->i_blocks) {
+ CDEBUG(D_IOCTL, "copying inline data: ino %ld\n", dest->i_ino);
+ memcpy(&dest->u.ext2_i.i_data, &src->u.ext2_i.i_data,
+ sizeof(src->u.ext2_i.i_data));
+ }
}
-
-
-
-
-
-
-
#endif