Commit 09261189 authored by Vojtech Pavlik's avatar Vojtech Pavlik

Merge suse.cz:/home/vojtech/bk/linus into suse.cz:/home/vojtech/bk/input

parents ce87f5c1 c39f7320
...@@ -164,6 +164,9 @@ export srctree objtree ...@@ -164,6 +164,9 @@ export srctree objtree
SUBDIRS := init kernel mm fs ipc lib drivers sound net security SUBDIRS := init kernel mm fs ipc lib drivers sound net security
# The temporary file to save gcc -MD generated dependencies must not
# contain a comma
depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
noconfig_targets := xconfig menuconfig config oldconfig randconfig \ noconfig_targets := xconfig menuconfig config oldconfig randconfig \
defconfig allyesconfig allnoconfig allmodconfig \ defconfig allyesconfig allnoconfig allmodconfig \
...@@ -318,8 +321,12 @@ prepare: include/linux/version.h include/asm include/config/MARKER ...@@ -318,8 +321,12 @@ prepare: include/linux/version.h include/asm include/config/MARKER
# This can be used by arch/$ARCH/Makefile to preprocess # This can be used by arch/$ARCH/Makefile to preprocess
# their vmlinux.lds.S file # their vmlinux.lds.S file
arch/$(ARCH)/vmlinux.lds.s: arch/$(ARCH)/vmlinux.lds.S AFLAGS_vmlinux.lds.o += -P -C -U$(ARCH)
$(CPP) $(CPPFLAGS) $(CPPFLAGS_$@) -P -C -U$(ARCH) $< -o $@
arch/$(ARCH)/vmlinux.lds.s: arch/$(ARCH)/vmlinux.lds.S FORCE
$(call if_changed_dep,as_s_S)
targets += arch/$(ARCH)/vmlinux.lds.s
# Single targets # Single targets
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
...@@ -782,13 +789,34 @@ endif # ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) ...@@ -782,13 +789,34 @@ endif # ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
# FIXME Should go into a make.lib or something # FIXME Should go into a make.lib or something
# =========================================================================== # ===========================================================================
a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(NOSTDINC_FLAGS) \
$(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
quiet_cmd_as_s_S = CPP $(echo_target)
cmd_as_s_S = $(CPP) $(a_flags) -o $@ $<
# read all saved command lines # read all saved command lines
cmd_files := $(wildcard .*.cmd) targets := $(wildcard $(sort $(targets)))
cmd_files := $(wildcard .*.cmd $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
ifneq ($(cmd_files),) ifneq ($(cmd_files),)
include $(cmd_files) include $(cmd_files)
endif endif
# execute the command and also postprocess generated .d dependencies
# file
if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\
$(filter-out $(cmd_$(1)),$(cmd_$@))\
$(filter-out $(cmd_$@),$(cmd_$(1)))),\
@set -e; \
$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) \
$(cmd_$(1)); \
$(TOPDIR)/scripts/fixdep $(depfile) $@ $(TOPDIR) '$(cmd_$(1))' > $(@D)/.$(@F).tmp; \
rm -f $(depfile); \
mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd)
# Usage: $(call if_changed_rule,foo) # Usage: $(call if_changed_rule,foo)
# will check if $(cmd_foo) changed, or any of the prequisites changed, # will check if $(cmd_foo) changed, or any of the prequisites changed,
# and if so will execute $(rule_foo) # and if so will execute $(rule_foo)
......
...@@ -289,7 +289,7 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< ...@@ -289,7 +289,7 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
%.o: %.c FORCE %.o: %.c FORCE
$(call if_changed_dep,cc_o_c) $(call if_changed_dep,cc_o_c)
quiet_cmd_cc_lst_c = ' Generating $(echo_target)' quiet_cmd_cc_lst_c = MKLST $(echo_target)
cmd_cc_lst_c = $(CC) $(c_flags) -g -c -o $*.o $< && $(TOPDIR)/scripts/makelst $*.o $(TOPDIR)/System.map $(OBJDUMP) > $@ cmd_cc_lst_c = $(CC) $(c_flags) -g -c -o $*.o $< && $(TOPDIR)/scripts/makelst $*.o $(TOPDIR)/System.map $(OBJDUMP) > $@
%.lst: %.c FORCE %.lst: %.c FORCE
...@@ -411,9 +411,11 @@ endif # ! fastdep ...@@ -411,9 +411,11 @@ endif # ! fastdep
# Shipped files # Shipped files
# =========================================================================== # ===========================================================================
quiet_cmd_shipped = SHIPPED $(echo_target)
cmd_shipped = cat $< > $@
%:: %_shipped %:: %_shipped
@echo ' CP $(echo_target)' $(call cmd,shipped)
@cp $< $@
# Commands useful for building a boot image # Commands useful for building a boot image
# =========================================================================== # ===========================================================================
...@@ -421,7 +423,7 @@ endif # ! fastdep ...@@ -421,7 +423,7 @@ endif # ! fastdep
# Use as following: # Use as following:
# #
# target: source(s) FORCE # target: source(s) FORCE
# $(if_changed,ld/objcopy) # $(if_changed,ld/objcopy/gzip)
# #
# and add target to EXTRA_TARGETS so that we know we have to # and add target to EXTRA_TARGETS so that we know we have to
# read in the saved command line # read in the saved command line
...@@ -436,7 +438,7 @@ cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$@) \ ...@@ -436,7 +438,7 @@ cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$@) \
# Objcopy # Objcopy
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
quiet_cmd_objcopy = OBJCPY $(echo_target) quiet_cmd_objcopy = OBJCOPY $(echo_target)
cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $< $@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $< $@
# Gzip # Gzip
......
...@@ -96,9 +96,6 @@ MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot ...@@ -96,9 +96,6 @@ MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
vmlinux: arch/$(ARCH)/vmlinux.lds.s vmlinux: arch/$(ARCH)/vmlinux.lds.s
arch/$(ARCH)/vmlinux.lds.s: arch/$(ARCH)/vmlinux.lds.S
$(CPP) $(CPPFLAGS) $(CPPFLAGS_$@) -D__ASSEMBLY__ -P -C -U$(ARCH) $< -o $@
compressed: vmlinux compressed: vmlinux
$(OBJCOPY) $(OBJCOPYFLAGS) vmlinux vmlinux-tmp $(OBJCOPY) $(OBJCOPYFLAGS) vmlinux vmlinux-tmp
gzip vmlinux-tmp gzip vmlinux-tmp
......
...@@ -149,7 +149,7 @@ endif ...@@ -149,7 +149,7 @@ endif
vmlinux: arch/mips64/vmlinux.lds.s vmlinux: arch/mips64/vmlinux.lds.s
CPPFLAGS_arch/mips64/vmlinux.lds.s := -imacros $(srctree)/include/asm-mips64/sn/mapped_kernel.h AFLAGS_vmlinux.lds.o := -imacros $(srctree)/include/asm-mips64/sn/mapped_kernel.h
ifdef CONFIG_MAPPED_KERNEL ifdef CONFIG_MAPPED_KERNEL
vmlinux.64: vmlinux vmlinux.64: vmlinux
......
...@@ -72,9 +72,7 @@ endif ...@@ -72,9 +72,7 @@ endif
vmlinux: arch/sh/vmlinux.lds.s vmlinux: arch/sh/vmlinux.lds.s
CPPFLAGS_arch/sh/vmlinux.lds.s := -traditional AFLAGS_vmlinux.lds.o := -traditional
FORCE: ;
zImage: vmlinux zImage: vmlinux
@$(MAKEBOOT) zImage @$(MAKEBOOT) zImage
......
...@@ -56,11 +56,8 @@ ...@@ -56,11 +56,8 @@
#include <linux/blk.h> #include <linux/blk.h>
#define DEBUG 0 #define DEBUG 0
#if DEBUG #define dprintk(x...) ((void)(DEBUG && printk(x)))
# define dprintk(x...) printk(x)
#else
# define dprintk(x...) do { } while(0)
#endif
#ifndef MODULE #ifndef MODULE
static void autostart_arrays (void); static void autostart_arrays (void);
...@@ -604,18 +601,6 @@ static void export_array(mddev_t *mddev) ...@@ -604,18 +601,6 @@ static void export_array(mddev_t *mddev)
mddev->raid_disks = 0; mddev->raid_disks = 0;
} }
static void free_mddev(mddev_t *mddev)
{
if (!mddev) {
MD_BUG();
return;
}
export_array(mddev);
md_size[mdidx(mddev)] = 0;
set_capacity(disks[mdidx(mddev)], 0);
}
#undef BAD_CSUM #undef BAD_CSUM
#undef BAD_MAGIC #undef BAD_MAGIC
#undef OUT_OF_MEM #undef OUT_OF_MEM
...@@ -1533,7 +1518,6 @@ static int do_md_stop(mddev_t * mddev, int ro) ...@@ -1533,7 +1518,6 @@ static int do_md_stop(mddev_t * mddev, int ro)
{ {
int err = 0; int err = 0;
kdev_t dev = mddev_to_kdev(mddev); kdev_t dev = mddev_to_kdev(mddev);
struct gendisk *disk;
if (atomic_read(&mddev->active)>1) { if (atomic_read(&mddev->active)>1) {
printk(STILL_IN_USE, mdidx(mddev)); printk(STILL_IN_USE, mdidx(mddev));
...@@ -1582,6 +1566,16 @@ static int do_md_stop(mddev_t * mddev, int ro) ...@@ -1582,6 +1566,16 @@ static int do_md_stop(mddev_t * mddev, int ro)
if (ro) if (ro)
set_device_ro(dev, 1); set_device_ro(dev, 1);
} }
/*
* Free resources if final stop
*/
if (!ro) {
struct gendisk *disk;
printk(KERN_INFO "md: md%d stopped.\n", mdidx(mddev));
export_array(mddev);
md_size[mdidx(mddev)] = 0;
disk = disks[mdidx(mddev)]; disk = disks[mdidx(mddev)];
disks[mdidx(mddev)] = NULL; disks[mdidx(mddev)] = NULL;
...@@ -1591,12 +1585,6 @@ static int do_md_stop(mddev_t * mddev, int ro) ...@@ -1591,12 +1585,6 @@ static int do_md_stop(mddev_t * mddev, int ro)
kfree(disk); kfree(disk);
} }
/*
* Free resources if final stop
*/
if (!ro) {
printk(KERN_INFO "md: md%d stopped.\n", mdidx(mddev));
free_mddev(mddev);
} else } else
printk(KERN_INFO "md: md%d switched to read-only mode.\n", mdidx(mddev)); printk(KERN_INFO "md: md%d switched to read-only mode.\n", mdidx(mddev));
err = 0; err = 0;
...@@ -2593,7 +2581,7 @@ static void md_recover_arrays(void) ...@@ -2593,7 +2581,7 @@ static void md_recover_arrays(void)
void md_error(mddev_t *mddev, mdk_rdev_t *rdev) void md_error(mddev_t *mddev, mdk_rdev_t *rdev)
{ {
dprintk("md_error dev:(%d:%d), rdev:(%d:%d), (caller: %p,%p,%p,%p).\n", dprintk("md_error dev:(%d:%d), rdev:(%d:%d), (caller: %p,%p,%p,%p).\n",
MD_MAJOR,mdidx(mddev),MAJOR(bdev->bd_dev),MINOR(bdev->bd_dev), MD_MAJOR,mdidx(mddev),MAJOR(rdev->bdev->bd_dev),MINOR(rdev->bdev->bd_dev),
__builtin_return_address(0),__builtin_return_address(1), __builtin_return_address(0),__builtin_return_address(1),
__builtin_return_address(2),__builtin_return_address(3)); __builtin_return_address(2),__builtin_return_address(3));
...@@ -3149,11 +3137,11 @@ request_queue_t * md_queue_proc(kdev_t dev) ...@@ -3149,11 +3137,11 @@ request_queue_t * md_queue_proc(kdev_t dev)
{ {
mddev_t *mddev = mddev_find(minor(dev)); mddev_t *mddev = mddev_find(minor(dev));
request_queue_t *q = BLK_DEFAULT_QUEUE(MAJOR_NR); request_queue_t *q = BLK_DEFAULT_QUEUE(MAJOR_NR);
if (!mddev || atomic_read(&mddev->active)<2) if (mddev) {
BUG();
if (mddev->pers) if (mddev->pers)
q = &mddev->queue; q = &mddev->queue;
mddev_put(mddev); /* the caller must hold a reference... */ mddev_put(mddev);
}
return q; return q;
} }
......
...@@ -37,20 +37,6 @@ ...@@ -37,20 +37,6 @@
#define NR_RESERVED_BUFS 32 #define NR_RESERVED_BUFS 32
/*
* The following can be used to debug the driver
*/
#define MULTIPATH_DEBUG 0
#if MULTIPATH_DEBUG
#define PRINTK(x...) printk(x)
#define inline
#define __inline__
#else
#define PRINTK(x...) do { } while (0)
#endif
static mdk_personality_t multipath_personality; static mdk_personality_t multipath_personality;
static spinlock_t retry_list_lock = SPIN_LOCK_UNLOCKED; static spinlock_t retry_list_lock = SPIN_LOCK_UNLOCKED;
struct multipath_bh *multipath_retry_list = NULL, **multipath_retry_tail; struct multipath_bh *multipath_retry_list = NULL, **multipath_retry_tail;
......
...@@ -49,12 +49,10 @@ ...@@ -49,12 +49,10 @@
# define CHECK_DEVLOCK() # define CHECK_DEVLOCK()
#endif #endif
#define PRINTK(x...) ((void)(RAID5_DEBUG && printk(x)))
#if RAID5_DEBUG #if RAID5_DEBUG
#define PRINTK(x...) printk(x)
#define inline #define inline
#define __inline__ #define __inline__
#else
#define PRINTK(x...) do { } while (0)
#endif #endif
static void print_raid5_conf (raid5_conf_t *conf); static void print_raid5_conf (raid5_conf_t *conf);
...@@ -933,13 +931,16 @@ static void handle_stripe(struct stripe_head *sh) ...@@ -933,13 +931,16 @@ static void handle_stripe(struct stripe_head *sh)
test_bit(R5_UPTODATE, &dev->flags)) test_bit(R5_UPTODATE, &dev->flags))
|| (failed == 1 && failed_num == sh->pd_idx)) || (failed == 1 && failed_num == sh->pd_idx))
) { ) {
/* any written block on an uptodate or failed drive can be returned */ /* any written block on an uptodate or failed drive can be returned.
* Note that if we 'wrote' to a failed drive, it will be UPTODATE, but
* never LOCKED, so we don't need to test 'failed' directly.
*/
for (i=disks; i--; ) for (i=disks; i--; )
if (sh->dev[i].written) { if (sh->dev[i].written) {
dev = &sh->dev[i]; dev = &sh->dev[i];
if (!test_bit(R5_Insync, &sh->dev[sh->pd_idx].flags) && if (!test_bit(R5_LOCKED, &dev->flags) &&
(!test_bit(R5_LOCKED, &dev->flags) && test_bit(R5_UPTODATE, &dev->flags)) ) { test_bit(R5_UPTODATE, &dev->flags) ) {
/* maybe we can return some write requests */ /* We can return any write requests */
struct bio *wbi, *wbi2; struct bio *wbi, *wbi2;
PRINTK("Return write for disc %d\n", i); PRINTK("Return write for disc %d\n", i);
wbi = dev->written; wbi = dev->written;
...@@ -1164,7 +1165,7 @@ static void handle_stripe(struct stripe_head *sh) ...@@ -1164,7 +1165,7 @@ static void handle_stripe(struct stripe_head *sh)
md_sync_acct(rdev, STRIPE_SECTORS); md_sync_acct(rdev, STRIPE_SECTORS);
bi->bi_bdev = rdev->bdev; bi->bi_bdev = rdev->bdev;
PRINTK("for %ld schedule op %d on disc %d\n", sh->sector, bi->bi_rw, i); PRINTK("for %ld schedule op %ld on disc %d\n", sh->sector, bi->bi_rw, i);
atomic_inc(&sh->count); atomic_inc(&sh->count);
bi->bi_sector = sh->sector; bi->bi_sector = sh->sector;
bi->bi_flags = 0; bi->bi_flags = 0;
...@@ -1175,7 +1176,7 @@ static void handle_stripe(struct stripe_head *sh) ...@@ -1175,7 +1176,7 @@ static void handle_stripe(struct stripe_head *sh)
bi->bi_next = NULL; bi->bi_next = NULL;
generic_make_request(bi); generic_make_request(bi);
} else { } else {
PRINTK("skip op %d on disc %d for sector %ld\n", bi->bi_rw, i, sh->sector); PRINTK("skip op %ld on disc %d for sector %ld\n", bi->bi_rw, i, sh->sector);
clear_bit(R5_LOCKED, &dev->flags); clear_bit(R5_LOCKED, &dev->flags);
set_bit(STRIPE_HANDLE, &sh->state); set_bit(STRIPE_HANDLE, &sh->state);
} }
...@@ -1242,8 +1243,8 @@ static int make_request (request_queue_t *q, struct bio * bi) ...@@ -1242,8 +1243,8 @@ static int make_request (request_queue_t *q, struct bio * bi)
new_sector = raid5_compute_sector(logical_sector, new_sector = raid5_compute_sector(logical_sector,
raid_disks, data_disks, &dd_idx, &pd_idx, conf); raid_disks, data_disks, &dd_idx, &pd_idx, conf);
PRINTK("raid5: make_request, sector %ul logical %ul\n", PRINTK("raid5: make_request, sector %Lu logical %Lu\n",
new_sector, logical_sector); (unsigned long long)new_sector, (unsigned long long)logical_sector);
sh = get_active_stripe(conf, new_sector, pd_idx, (bi->bi_rw&RWA_MASK)); sh = get_active_stripe(conf, new_sector, pd_idx, (bi->bi_rw&RWA_MASK));
if (sh) { if (sh) {
......
...@@ -25,18 +25,18 @@ ...@@ -25,18 +25,18 @@
*/ */
/* /*
* basic btree page - btpage_t * basic btree page - btpage
*/ *
typedef struct { struct btpage {
s64 next; /* 8: right sibling bn */ s64 next; right sibling bn
s64 prev; /* 8: left sibling bn */ s64 prev; left sibling bn
u8 flag; /* 1: */ u8 flag;
u8 rsrvd[7]; /* 7: type specific */ u8 rsrvd[7]; type specific
s64 self; /* 8: self address */ s64 self; self address
u8 entry[4064]; /* 4064: */ u8 entry[4064];
} btpage_t; /* (4096) */ }; */
/* btpaget_t flag */ /* btpaget_t flag */
#define BT_TYPE 0x07 /* B+-tree index */ #define BT_TYPE 0x07 /* B+-tree index */
...@@ -68,7 +68,7 @@ typedef struct { ...@@ -68,7 +68,7 @@ typedef struct {
{\ {\
if ((BN) == 0)\ if ((BN) == 0)\
{\ {\
MP = (metapage_t *)&JFS_IP(IP)->bxflag;\ MP = (struct metapage *)&JFS_IP(IP)->bxflag;\
P = (TYPE *)&JFS_IP(IP)->ROOT;\ P = (TYPE *)&JFS_IP(IP)->ROOT;\
RC = 0;\ RC = 0;\
jEVENT(0,("%d BT_GETPAGE returning root\n", __LINE__));\ jEVENT(0,("%d BT_GETPAGE returning root\n", __LINE__));\
...@@ -112,18 +112,18 @@ typedef struct { ...@@ -112,18 +112,18 @@ typedef struct {
* top frame record the leaf page/entry selected. * top frame record the leaf page/entry selected.
*/ */
#define MAXTREEHEIGHT 8 #define MAXTREEHEIGHT 8
typedef struct btframe { /* stack frame */ struct btframe { /* stack frame */
s64 bn; /* 8: */ s64 bn; /* 8: */
s16 index; /* 2: */ s16 index; /* 2: */
s16 lastindex; /* 2: */ s16 lastindex; /* 2: */
struct metapage *mp; /* 4: */ struct metapage *mp; /* 4: */
} btframe_t; /* (16) */ }; /* (16) */
typedef struct btstack { struct btstack {
btframe_t *top; /* 4: */ struct btframe *top;
int nsplit; /* 4: */ int nsplit;
btframe_t stack[MAXTREEHEIGHT]; struct btframe stack[MAXTREEHEIGHT];
} btstack_t; };
#define BT_CLR(btstack)\ #define BT_CLR(btstack)\
(btstack)->top = (btstack)->stack (btstack)->top = (btstack)->stack
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
/* /*
* defragfs parameter list * defragfs parameter list
*/ */
typedef struct { struct defragfs {
uint flag; /* 4: */ uint flag; /* 4: */
u8 dev; /* 1: */ u8 dev; /* 1: */
u8 pad[3]; /* 3: */ u8 pad[3]; /* 3: */
...@@ -33,7 +33,7 @@ typedef struct { ...@@ -33,7 +33,7 @@ typedef struct {
s64 old_xaddr; /* 8: */ s64 old_xaddr; /* 8: */
s64 new_xaddr; /* 8: */ s64 new_xaddr; /* 8: */
s32 xlen; /* 4: */ s32 xlen; /* 4: */
} defragfs_t; /* (52) */ };
/* plist flag */ /* plist flag */
#define DEFRAGFS_SYNC 0x80000000 #define DEFRAGFS_SYNC 0x80000000
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
/* /*
* on-disk inode (dinode_t): 512 bytes * on-disk inode : 512 bytes
* *
* note: align 64-bit fields on 8-byte boundary. * note: align 64-bit fields on 8-byte boundary.
*/ */
...@@ -89,7 +89,7 @@ struct dinode { ...@@ -89,7 +89,7 @@ struct dinode {
* If the index is small enough, the table is inline, * If the index is small enough, the table is inline,
* otherwise, an x-tree root overlays this table * otherwise, an x-tree root overlays this table
*/ */
dir_table_slot_t _table[12]; /* 96: inline */ struct dir_table_slot _table[12]; /* 96: inline */
dtroot_t _dtroot; /* 288: dtree root */ dtroot_t _dtroot; /* 288: dtree root */
} _dir; /* (384) */ } _dir; /* (384) */
...@@ -131,9 +131,6 @@ struct dinode { ...@@ -131,9 +131,6 @@ struct dinode {
} u; } u;
}; };
typedef struct dinode dinode_t;
/* extended mode bits (on-disk inode di_mode) */ /* extended mode bits (on-disk inode di_mode) */
#define IFJOURNAL 0x00010000 /* journalled file */ #define IFJOURNAL 0x00010000 /* journalled file */
#define ISPARSE 0x00020000 /* sparse file enabled */ #define ISPARSE 0x00020000 /* sparse file enabled */
......
This diff is collapsed.
...@@ -142,9 +142,9 @@ static __inline signed char TREEMAX(signed char *cp) ...@@ -142,9 +142,9 @@ static __inline signed char TREEMAX(signed char *cp)
/* /*
* dmap summary tree * dmap summary tree
* *
* dmaptree_t must be consistent with dmapctl_t. * dmaptree must be consistent with dmapctl.
*/ */
typedef struct { struct dmaptree {
s32 nleafs; /* 4: number of tree leafs */ s32 nleafs; /* 4: number of tree leafs */
s32 l2nleafs; /* 4: l2 number of tree leafs */ s32 l2nleafs; /* 4: l2 number of tree leafs */
s32 leafidx; /* 4: index of first tree leaf */ s32 leafidx; /* 4: index of first tree leaf */
...@@ -152,27 +152,27 @@ typedef struct { ...@@ -152,27 +152,27 @@ typedef struct {
s8 budmin; /* 1: min l2 tree leaf value to combine */ s8 budmin; /* 1: min l2 tree leaf value to combine */
s8 stree[TREESIZE]; /* TREESIZE: tree */ s8 stree[TREESIZE]; /* TREESIZE: tree */
u8 pad[2]; /* 2: pad to word boundary */ u8 pad[2]; /* 2: pad to word boundary */
} dmaptree_t; /* - 360 - */ }; /* - 360 - */
/* /*
* dmap page per 8K blocks bitmap * dmap page per 8K blocks bitmap
*/ */
typedef struct { struct dmap {
s32 nblocks; /* 4: num blks covered by this dmap */ s32 nblocks; /* 4: num blks covered by this dmap */
s32 nfree; /* 4: num of free blks in this dmap */ s32 nfree; /* 4: num of free blks in this dmap */
s64 start; /* 8: starting blkno for this dmap */ s64 start; /* 8: starting blkno for this dmap */
dmaptree_t tree; /* 360: dmap tree */ struct dmaptree tree; /* 360: dmap tree */
u8 pad[1672]; /* 1672: pad to 2048 bytes */ u8 pad[1672]; /* 1672: pad to 2048 bytes */
u32 wmap[LPERDMAP]; /* 1024: bits of the working map */ u32 wmap[LPERDMAP]; /* 1024: bits of the working map */
u32 pmap[LPERDMAP]; /* 1024: bits of the persistent map */ u32 pmap[LPERDMAP]; /* 1024: bits of the persistent map */
} dmap_t; /* - 4096 - */ }; /* - 4096 - */
/* /*
* disk map control page per level. * disk map control page per level.
* *
* dmapctl_t must be consistent with dmaptree_t. * dmapctl must be consistent with dmaptree.
*/ */
typedef struct { struct dmapctl {
s32 nleafs; /* 4: number of tree leafs */ s32 nleafs; /* 4: number of tree leafs */
s32 l2nleafs; /* 4: l2 number of tree leafs */ s32 l2nleafs; /* 4: l2 number of tree leafs */
s32 leafidx; /* 4: index of the first tree leaf */ s32 leafidx; /* 4: index of the first tree leaf */
...@@ -180,17 +180,17 @@ typedef struct { ...@@ -180,17 +180,17 @@ typedef struct {
s8 budmin; /* 1: minimum l2 tree leaf value */ s8 budmin; /* 1: minimum l2 tree leaf value */
s8 stree[CTLTREESIZE]; /* CTLTREESIZE: dmapctl tree */ s8 stree[CTLTREESIZE]; /* CTLTREESIZE: dmapctl tree */
u8 pad[2714]; /* 2714: pad to 4096 */ u8 pad[2714]; /* 2714: pad to 4096 */
} dmapctl_t; /* - 4096 - */ }; /* - 4096 - */
/* /*
* common definition for dmaptree_t within dmap and dmapctl * common definition for dmaptree within dmap and dmapctl
*/ */
typedef union { typedef union dmtree {
dmaptree_t t1; struct dmaptree t1;
dmapctl_t t2; struct dmapctl t2;
} dmtree_t; } dmtree_t;
/* macros for accessing fields within dmtree_t */ /* macros for accessing fields within dmtree */
#define dmt_nleafs t1.nleafs #define dmt_nleafs t1.nleafs
#define dmt_l2nleafs t1.l2nleafs #define dmt_l2nleafs t1.l2nleafs
#define dmt_leafidx t1.leafidx #define dmt_leafidx t1.leafidx
...@@ -201,7 +201,7 @@ typedef union { ...@@ -201,7 +201,7 @@ typedef union {
/* /*
* on-disk aggregate disk allocation map descriptor. * on-disk aggregate disk allocation map descriptor.
*/ */
typedef struct { struct dbmap {
s64 dn_mapsize; /* 8: number of blocks in aggregate */ s64 dn_mapsize; /* 8: number of blocks in aggregate */
s64 dn_nfree; /* 8: num free blks in aggregate map */ s64 dn_nfree; /* 8: num free blks in aggregate map */
s32 dn_l2nbperpage; /* 4: number of blks per page */ s32 dn_l2nbperpage; /* 4: number of blks per page */
...@@ -218,17 +218,17 @@ typedef struct { ...@@ -218,17 +218,17 @@ typedef struct {
s64 dn_agsize; /* 8: num of blks per alloc group */ s64 dn_agsize; /* 8: num of blks per alloc group */
s8 dn_maxfreebud; /* 1: max free buddy system */ s8 dn_maxfreebud; /* 1: max free buddy system */
u8 pad[3007]; /* 3007: pad to 4096 */ u8 pad[3007]; /* 3007: pad to 4096 */
} dbmap_t; /* - 4096 - */ }; /* - 4096 - */
/* /*
* in-memory aggregate disk allocation map descriptor. * in-memory aggregate disk allocation map descriptor.
*/ */
typedef struct bmap { struct bmap {
dbmap_t db_bmap; /* on-disk aggregate map descriptor */ struct dbmap db_bmap; /* on-disk aggregate map descriptor */
struct inode *db_ipbmap; /* ptr to aggregate map incore inode */ struct inode *db_ipbmap; /* ptr to aggregate map incore inode */
struct semaphore db_bmaplock; /* aggregate map lock */ struct semaphore db_bmaplock; /* aggregate map lock */
u32 *db_DBmap; u32 *db_DBmap;
} bmap_t; };
/* macros for accessing fields within in-memory aggregate map descriptor */ /* macros for accessing fields within in-memory aggregate map descriptor */
#define db_mapsize db_bmap.dn_mapsize #define db_mapsize db_bmap.dn_mapsize
...@@ -279,7 +279,7 @@ extern int dbUnmount(struct inode *ipbmap, int mounterror); ...@@ -279,7 +279,7 @@ extern int dbUnmount(struct inode *ipbmap, int mounterror);
extern int dbFree(struct inode *ipbmap, s64 blkno, s64 nblocks); extern int dbFree(struct inode *ipbmap, s64 blkno, s64 nblocks);
extern int dbUpdatePMap(struct inode *ipbmap, extern int dbUpdatePMap(struct inode *ipbmap,
int free, s64 blkno, s64 nblocks, tblock_t * tblk); int free, s64 blkno, s64 nblocks, struct tblock * tblk);
extern int dbNextAG(struct inode *ipbmap); extern int dbNextAG(struct inode *ipbmap);
......
This diff is collapsed.
...@@ -44,11 +44,11 @@ typedef union { ...@@ -44,11 +44,11 @@ typedef union {
/* /*
* directory page slot * directory page slot
*/ */
typedef struct { struct dtslot {
s8 next; /* 1: */ s8 next; /* 1: */
s8 cnt; /* 1: */ s8 cnt; /* 1: */
wchar_t name[15]; /* 30: */ wchar_t name[15]; /* 30: */
} dtslot_t; /* (32) */ }; /* (32) */
#define DATASLOTSIZE 16 #define DATASLOTSIZE 16
...@@ -62,13 +62,13 @@ typedef struct { ...@@ -62,13 +62,13 @@ typedef struct {
/* /*
* internal node entry head/only segment * internal node entry head/only segment
*/ */
typedef struct { struct idtentry {
pxd_t xd; /* 8: child extent descriptor */ pxd_t xd; /* 8: child extent descriptor */
s8 next; /* 1: */ s8 next; /* 1: */
u8 namlen; /* 1: */ u8 namlen; /* 1: */
wchar_t name[11]; /* 22: 2-byte aligned */ wchar_t name[11]; /* 22: 2-byte aligned */
} idtentry_t; /* (32) */ }; /* (32) */
#define DTIHDRSIZE 10 #define DTIHDRSIZE 10
#define DTIHDRDATALEN 11 #define DTIHDRDATALEN 11
...@@ -82,13 +82,13 @@ typedef struct { ...@@ -82,13 +82,13 @@ typedef struct {
* *
* For legacy filesystems, name contains 13 wchars -- no index field * For legacy filesystems, name contains 13 wchars -- no index field
*/ */
typedef struct { struct ldtentry {
u32 inumber; /* 4: 4-byte aligned */ u32 inumber; /* 4: 4-byte aligned */
s8 next; /* 1: */ s8 next; /* 1: */
u8 namlen; /* 1: */ u8 namlen; /* 1: */
wchar_t name[11]; /* 22: 2-byte aligned */ wchar_t name[11]; /* 22: 2-byte aligned */
u32 index; /* 4: index into dir_table */ u32 index; /* 4: index into dir_table */
} ldtentry_t; /* (32) */ }; /* (32) */
#define DTLHDRSIZE 6 #define DTLHDRSIZE 6
#define DTLHDRDATALEN_LEGACY 13 /* Old (OS/2) format */ #define DTLHDRDATALEN_LEGACY 13 /* Old (OS/2) format */
...@@ -108,14 +108,14 @@ typedef struct { ...@@ -108,14 +108,14 @@ typedef struct {
*/ */
#define MAX_INLINE_DIRTABLE_ENTRY 13 #define MAX_INLINE_DIRTABLE_ENTRY 13
typedef struct dir_table_slot { struct dir_table_slot {
u8 rsrvd; /* 1: */ u8 rsrvd; /* 1: */
u8 flag; /* 1: 0 if free */ u8 flag; /* 1: 0 if free */
u8 slot; /* 1: slot within leaf page of entry */ u8 slot; /* 1: slot within leaf page of entry */
u8 addr1; /* 1: upper 8 bits of leaf page address */ u8 addr1; /* 1: upper 8 bits of leaf page address */
u32 addr2; /* 4: lower 32 bits of leaf page address -OR- u32 addr2; /* 4: lower 32 bits of leaf page address -OR-
index of next entry when this entry was deleted */ index of next entry when this entry was deleted */
} dir_table_slot_t; /* (8) */ }; /* (8) */
/* /*
* flag values * flag values
...@@ -144,7 +144,7 @@ typedef struct dir_table_slot { ...@@ -144,7 +144,7 @@ typedef struct dir_table_slot {
*/ */
typedef union { typedef union {
struct { struct {
dasd_t DASD; /* 16: DASD limit/usage info F226941 */ struct dasd DASD; /* 16: DASD limit/usage info */
u8 flag; /* 1: */ u8 flag; /* 1: */
u8 nextindex; /* 1: next free entry in stbl */ u8 nextindex; /* 1: next free entry in stbl */
...@@ -156,7 +156,7 @@ typedef union { ...@@ -156,7 +156,7 @@ typedef union {
s8 stbl[8]; /* 8: sorted entry index table */ s8 stbl[8]; /* 8: sorted entry index table */
} header; /* (32) */ } header; /* (32) */
dtslot_t slot[9]; struct dtslot slot[9];
} dtroot_t; } dtroot_t;
#define PARENT(IP) \ #define PARENT(IP) \
...@@ -207,7 +207,7 @@ typedef union { ...@@ -207,7 +207,7 @@ typedef union {
pxd_t self; /* 8: self pxd */ pxd_t self; /* 8: self pxd */
} header; /* (32) */ } header; /* (32) */
dtslot_t slot[128]; struct dtslot slot[128];
} dtpage_t; } dtpage_t;
#define DTPAGEMAXSLOT 128 #define DTPAGEMAXSLOT 128
...@@ -256,20 +256,20 @@ typedef union { ...@@ -256,20 +256,20 @@ typedef union {
*/ */
extern void dtInitRoot(tid_t tid, struct inode *ip, u32 idotdot); extern void dtInitRoot(tid_t tid, struct inode *ip, u32 idotdot);
extern int dtSearch(struct inode *ip, component_t * key, extern int dtSearch(struct inode *ip, struct component_name * key,
ino_t * data, btstack_t * btstack, int flag); ino_t * data, struct btstack * btstack, int flag);
extern int dtInsert(tid_t tid, struct inode *ip, extern int dtInsert(tid_t tid, struct inode *ip, struct component_name * key,
component_t * key, ino_t * ino, btstack_t * btstack); ino_t * ino, struct btstack * btstack);
extern int dtDelete(tid_t tid, extern int dtDelete(tid_t tid, struct inode *ip, struct component_name * key,
struct inode *ip, component_t * key, ino_t * data, int flag); ino_t * data, int flag);
extern int dtRelocate(tid_t tid, extern int dtRelocate(tid_t tid,
struct inode *ip, s64 lmxaddr, pxd_t * opxd, s64 nxaddr); struct inode *ip, s64 lmxaddr, pxd_t * opxd, s64 nxaddr);
extern int dtModify(tid_t tid, struct inode *ip, extern int dtModify(tid_t tid, struct inode *ip, struct component_name * key,
component_t * key, ino_t * orig_ino, ino_t new_ino, int flag); ino_t * orig_ino, ino_t new_ino, int flag);
extern int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir); extern int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir);
......
...@@ -358,8 +358,8 @@ int extRealloc(struct inode *ip, s64 nxlen, xad_t * xp, boolean_t abnr) ...@@ -358,8 +358,8 @@ int extRealloc(struct inode *ip, s64 nxlen, xad_t * xp, boolean_t abnr)
int extHint(struct inode *ip, s64 offset, xad_t * xp) int extHint(struct inode *ip, s64 offset, xad_t * xp)
{ {
struct super_block *sb = ip->i_sb; struct super_block *sb = ip->i_sb;
xadlist_t xadl; struct xadlist xadl;
lxdlist_t lxdl; struct lxdlist lxdl;
lxd_t lxd; lxd_t lxd;
s64 prev; s64 prev;
int rc, nbperpage = JFS_SBI(sb)->nbperpage; int rc, nbperpage = JFS_SBI(sb)->nbperpage;
...@@ -516,7 +516,7 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno) ...@@ -516,7 +516,7 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno)
{ {
s64 nb, nblks, daddr, max; s64 nb, nblks, daddr, max;
int rc, nbperpage = JFS_SBI(ip->i_sb)->nbperpage; int rc, nbperpage = JFS_SBI(ip->i_sb)->nbperpage;
bmap_t *mp = JFS_SBI(ip->i_sb)->bmap; struct bmap *mp = JFS_SBI(ip->i_sb)->bmap;
/* get the number of blocks to initially attempt to allocate. /* get the number of blocks to initially attempt to allocate.
* we'll first try the number of blocks requested unless this * we'll first try the number of blocks requested unless this
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
#define MAXBLOCKSIZE 4096 #define MAXBLOCKSIZE 4096
#define MAXFILESIZE ((s64)1 << 52) #define MAXFILESIZE ((s64)1 << 52)
#define JFS_LINK_MAX 65535 /* nlink_t is unsigned short */ #define JFS_LINK_MAX 0xffffffff
/* Minimum number of bytes supported for a JFS partition */ /* Minimum number of bytes supported for a JFS partition */
#define MINJFS (0x1000000) #define MINJFS (0x1000000)
......
This diff is collapsed.
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
/* /*
* inode allocation group page (per 4096 inodes of an AG) * inode allocation group page (per 4096 inodes of an AG)
*/ */
typedef struct { struct iag {
s64 agstart; /* 8: starting block of ag */ s64 agstart; /* 8: starting block of ag */
s32 iagnum; /* 4: inode allocation group number */ s32 iagnum; /* 4: inode allocation group number */
s32 inofreefwd; /* 4: ag inode free list forward */ s32 inofreefwd; /* 4: ag inode free list forward */
...@@ -87,22 +87,22 @@ typedef struct { ...@@ -87,22 +87,22 @@ typedef struct {
u32 wmap[EXTSPERIAG]; /* 512: working allocation map */ u32 wmap[EXTSPERIAG]; /* 512: working allocation map */
u32 pmap[EXTSPERIAG]; /* 512: persistent allocation map */ u32 pmap[EXTSPERIAG]; /* 512: persistent allocation map */
pxd_t inoext[EXTSPERIAG]; /* 1024: inode extent addresses */ pxd_t inoext[EXTSPERIAG]; /* 1024: inode extent addresses */
} iag_t; /* (4096) */ }; /* (4096) */
/* /*
* per AG control information (in inode map control page) * per AG control information (in inode map control page)
*/ */
typedef struct { struct iagctl {
s32 inofree; /* 4: free inode list anchor */ s32 inofree; /* 4: free inode list anchor */
s32 extfree; /* 4: free extent list anchor */ s32 extfree; /* 4: free extent list anchor */
s32 numinos; /* 4: number of backed inodes */ s32 numinos; /* 4: number of backed inodes */
s32 numfree; /* 4: number of free inodes */ s32 numfree; /* 4: number of free inodes */
} iagctl_t; /* (16) */ }; /* (16) */
/* /*
* per fileset/aggregate inode map control page * per fileset/aggregate inode map control page
*/ */
typedef struct { struct dinomap {
s32 in_freeiag; /* 4: free iag list anchor */ s32 in_freeiag; /* 4: free iag list anchor */
s32 in_nextiag; /* 4: next free iag number */ s32 in_nextiag; /* 4: next free iag number */
s32 in_numinos; /* 4: num of backed inodes */ s32 in_numinos; /* 4: num of backed inodes */
...@@ -112,22 +112,22 @@ typedef struct { ...@@ -112,22 +112,22 @@ typedef struct {
s32 in_diskblock; /* 4: for standalone test driver */ s32 in_diskblock; /* 4: for standalone test driver */
s32 in_maxag; /* 4: for standalone test driver */ s32 in_maxag; /* 4: for standalone test driver */
u8 pad[2016]; /* 2016: pad to 2048 */ u8 pad[2016]; /* 2016: pad to 2048 */
iagctl_t in_agctl[MAXAG]; /* 2048: AG control information */ struct iagctl in_agctl[MAXAG]; /* 2048: AG control information */
} dinomap_t; /* (4096) */ }; /* (4096) */
/* /*
* In-core inode map control page * In-core inode map control page
*/ */
typedef struct inomap { struct inomap {
dinomap_t im_imap; /* 4096: inode allocation control */ struct dinomap im_imap; /* 4096: inode allocation control */
struct inode *im_ipimap; /* 4: ptr to inode for imap */ struct inode *im_ipimap; /* 4: ptr to inode for imap */
struct semaphore im_freelock; /* 4: iag free list lock */ struct semaphore im_freelock; /* 4: iag free list lock */
struct semaphore im_aglock[MAXAG]; /* 512: per AG locks */ struct semaphore im_aglock[MAXAG]; /* 512: per AG locks */
u32 *im_DBGdimap; u32 *im_DBGdimap;
atomic_t im_numinos; /* num of backed inodes */ atomic_t im_numinos; /* num of backed inodes */
atomic_t im_numfree; /* num of free backed inodes */ atomic_t im_numfree; /* num of free backed inodes */
} imap_t; };
#define im_freeiag im_imap.in_freeiag #define im_freeiag im_imap.in_freeiag
#define im_nextiag im_imap.in_nextiag #define im_nextiag im_imap.in_nextiag
...@@ -145,7 +145,7 @@ extern int diAlloc(struct inode *, boolean_t, struct inode *); ...@@ -145,7 +145,7 @@ extern int diAlloc(struct inode *, boolean_t, struct inode *);
extern int diSync(struct inode *); extern int diSync(struct inode *);
/* external references */ /* external references */
extern int diUpdatePMap(struct inode *ipimap, unsigned long inum, extern int diUpdatePMap(struct inode *ipimap, unsigned long inum,
boolean_t is_free, tblock_t * tblk); boolean_t is_free, struct tblock * tblk);
extern int diExtendFS(struct inode *ipimap, struct inode *ipbmap); extern int diExtendFS(struct inode *ipimap, struct inode *ipbmap);
extern int diMount(struct inode *); extern int diMount(struct inode *);
extern int diUnmount(struct inode *, int); extern int diUnmount(struct inode *, int);
......
...@@ -75,7 +75,7 @@ struct jfs_inode_info { ...@@ -75,7 +75,7 @@ struct jfs_inode_info {
struct inomap *_imap; /* 4: inode map header */ struct inomap *_imap; /* 4: inode map header */
} file; } file;
struct { struct {
dir_table_slot_t _table[12]; /* 96: directory index */ struct dir_table_slot _table[12]; /* 96: dir index */
dtroot_t _dtroot; /* 288: dtree root */ dtroot_t _dtroot; /* 288: dtree root */
} dir; } dir;
struct { struct {
......
This diff is collapsed.
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
#define MAX_ACTIVE 128 /* Max active file systems sharing log */ #define MAX_ACTIVE 128 /* Max active file systems sharing log */
typedef struct { struct logsuper {
u32 magic; /* 4: log lv identifier */ u32 magic; /* 4: log lv identifier */
s32 version; /* 4: version number */ s32 version; /* 4: version number */
s32 serial; /* 4: log open/mount counter */ s32 serial; /* 4: log open/mount counter */
...@@ -78,7 +78,7 @@ typedef struct { ...@@ -78,7 +78,7 @@ typedef struct {
struct { struct {
char uuid[16]; char uuid[16];
} active[MAX_ACTIVE]; /* 2048: active file systems list */ } active[MAX_ACTIVE]; /* 2048: active file systems list */
} logsuper_t; };
#define NULL_UUID "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" #define NULL_UUID "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
...@@ -119,7 +119,7 @@ typedef struct { ...@@ -119,7 +119,7 @@ typedef struct {
* the two and h.eor and t.eor set to 8 (i.e. empty page). if (only) * the two and h.eor and t.eor set to 8 (i.e. empty page). if (only)
* h.eor != t.eor they were set to the smaller of their two values. * h.eor != t.eor they were set to the smaller of their two values.
*/ */
typedef struct { struct logpage {
struct { /* header */ struct { /* header */
s32 page; /* 4: log sequence page number */ s32 page; /* 4: log sequence page number */
s16 rsrvd; /* 2: */ s16 rsrvd; /* 2: */
...@@ -133,7 +133,7 @@ typedef struct { ...@@ -133,7 +133,7 @@ typedef struct {
s16 rsrvd; /* 2: */ s16 rsrvd; /* 2: */
s16 eor; /* 2: normally the same as h.eor */ s16 eor; /* 2: normally the same as h.eor */
} t; } t;
} logpage_t; };
#define LOGPHDRSIZE 8 /* log page header size */ #define LOGPHDRSIZE 8 /* log page header size */
#define LOGPTLRSIZE 8 /* log page trailer size */ #define LOGPTLRSIZE 8 /* log page trailer size */
...@@ -198,7 +198,7 @@ typedef struct { ...@@ -198,7 +198,7 @@ typedef struct {
#define LOG_FREEPXD 0x0001 #define LOG_FREEPXD 0x0001
typedef struct lrd { struct lrd {
/* /*
* type independent area * type independent area
*/ */
...@@ -349,23 +349,23 @@ typedef struct lrd { ...@@ -349,23 +349,23 @@ typedef struct lrd {
* no type-dependent information * no type-dependent information
*/ */
} log; } log;
} lrd_t; /* (36) */ }; /* (36) */
#define LOGRDSIZE (sizeof(struct lrd)) #define LOGRDSIZE (sizeof(struct lrd))
/* /*
* line vector descriptor * line vector descriptor
*/ */
typedef struct { struct lvd {
s16 offset; s16 offset;
s16 length; s16 length;
} lvd_t; };
/* /*
* log logical volume * log logical volume
*/ */
typedef struct jfs_log { struct jfs_log {
struct super_block *sb; /* 4: This is used to sync metadata struct super_block *sb; /* 4: This is used to sync metadata
* before writing syncpt. Will * before writing syncpt. Will
...@@ -416,7 +416,7 @@ typedef struct jfs_log { ...@@ -416,7 +416,7 @@ typedef struct jfs_log {
struct lbuf *wqueue; /* 4: log pageout queue */ struct lbuf *wqueue; /* 4: log pageout queue */
int count; /* 4: count */ int count; /* 4: count */
char uuid[16]; /* 16: 128-bit uuid of log device */ char uuid[16]; /* 16: 128-bit uuid of log device */
} log_t; };
/* /*
* Log flag * Log flag
...@@ -428,10 +428,10 @@ typedef struct jfs_log { ...@@ -428,10 +428,10 @@ typedef struct jfs_log {
/* /*
* group commit flag * group commit flag
*/ */
/* log_t */ /* jfs_log */
#define logGC_PAGEOUT 0x00000001 #define logGC_PAGEOUT 0x00000001
/* tblock_t/lbuf_t */ /* tblock/lbuf */
#define tblkGC_QUEUE 0x0001 #define tblkGC_QUEUE 0x0001
#define tblkGC_READY 0x0002 #define tblkGC_READY 0x0002
#define tblkGC_COMMIT 0x0004 #define tblkGC_COMMIT 0x0004
...@@ -446,8 +446,8 @@ typedef struct jfs_log { ...@@ -446,8 +446,8 @@ typedef struct jfs_log {
/* /*
* log cache buffer header * log cache buffer header
*/ */
typedef struct lbuf { struct lbuf {
log_t *l_log; /* 4: log associated with buffer */ struct jfs_log *l_log; /* 4: log associated with buffer */
/* /*
* data buffer base area * data buffer base area
...@@ -466,7 +466,7 @@ typedef struct lbuf { ...@@ -466,7 +466,7 @@ typedef struct lbuf {
wait_queue_head_t l_ioevent; /* 4: i/o done event */ wait_queue_head_t l_ioevent; /* 4: i/o done event */
struct page *l_page; /* The page itself */ struct page *l_page; /* The page itself */
} lbuf_t; };
/* Reuse l_freelist for redrive list */ /* Reuse l_freelist for redrive list */
#define l_redrive_next l_freelist #define l_redrive_next l_freelist
...@@ -474,15 +474,15 @@ typedef struct lbuf { ...@@ -474,15 +474,15 @@ typedef struct lbuf {
/* /*
* logsynclist block * logsynclist block
* *
* common logsyncblk prefix for jbuf_t and tblock_t * common logsyncblk prefix for jbuf_t and tblock
*/ */
typedef struct logsyncblk { struct logsyncblk {
u16 xflag; /* flags */ u16 xflag; /* flags */
u16 flag; /* only meaninful in tblock_t */ u16 flag; /* only meaninful in tblock */
lid_t lid; /* lock id */ lid_t lid; /* lock id */
s32 lsn; /* log sequence number */ s32 lsn; /* log sequence number */
struct list_head synclist; /* log sync list link */ struct list_head synclist; /* log sync list link */
} logsyncblk_t; };
/* /*
* logsynclist serialization (per log) * logsynclist serialization (per log)
...@@ -500,12 +500,12 @@ typedef struct logsyncblk { ...@@ -500,12 +500,12 @@ typedef struct logsyncblk {
diff += (log)->logsize;\ diff += (log)->logsize;\
} }
extern int lmLogOpen(struct super_block *sb, log_t ** log); extern int lmLogOpen(struct super_block *sb, struct jfs_log ** log);
extern void lmLogWait(log_t * log); extern void lmLogWait(struct jfs_log * log);
extern int lmLogClose(struct super_block *sb, log_t * log); extern int lmLogClose(struct super_block *sb, struct jfs_log * log);
extern int lmLogSync(log_t * log, int nosyncwait); extern int lmLogSync(struct jfs_log * log, int nosyncwait);
extern int lmLogShutdown(log_t * log); extern int lmLogShutdown(struct jfs_log * log);
extern int lmLogInit(log_t * log); extern int lmLogInit(struct jfs_log * log);
extern int lmLogFormat(log_t *log, s64 logAddress, int logSize); extern int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize);
#endif /* _H_JFS_LOGMGR */ #endif /* _H_JFS_LOGMGR */
...@@ -40,7 +40,7 @@ struct { ...@@ -40,7 +40,7 @@ struct {
#define HASH_BITS 10 /* This makes hash_table 1 4K page */ #define HASH_BITS 10 /* This makes hash_table 1 4K page */
#define HASH_SIZE (1 << HASH_BITS) #define HASH_SIZE (1 << HASH_BITS)
static metapage_t **hash_table = NULL; static struct metapage **hash_table = NULL;
static unsigned long hash_order; static unsigned long hash_order;
...@@ -92,7 +92,7 @@ static mempool_t *metapage_mempool; ...@@ -92,7 +92,7 @@ static mempool_t *metapage_mempool;
static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags) static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags)
{ {
metapage_t *mp = (metapage_t *)foo; struct metapage *mp = (struct metapage *)foo;
if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
SLAB_CTOR_CONSTRUCTOR) { SLAB_CTOR_CONSTRUCTOR) {
...@@ -107,12 +107,12 @@ static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags) ...@@ -107,12 +107,12 @@ static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags)
} }
} }
static inline metapage_t *alloc_metapage(int no_wait) static inline struct metapage *alloc_metapage(int no_wait)
{ {
return mempool_alloc(metapage_mempool, no_wait ? GFP_ATOMIC : GFP_NOFS); return mempool_alloc(metapage_mempool, no_wait ? GFP_ATOMIC : GFP_NOFS);
} }
static inline void free_metapage(metapage_t *mp) static inline void free_metapage(struct metapage *mp)
{ {
mp->flag = 0; mp->flag = 0;
set_bit(META_free, &mp->flag); set_bit(META_free, &mp->flag);
...@@ -134,8 +134,8 @@ int __init metapage_init(void) ...@@ -134,8 +134,8 @@ int __init metapage_init(void)
/* /*
* Allocate the metapage structures * Allocate the metapage structures
*/ */
metapage_cache = kmem_cache_create("jfs_mp", sizeof(metapage_t), 0, 0, metapage_cache = kmem_cache_create("jfs_mp", sizeof(struct metapage),
init_once, NULL); 0, 0, init_once, NULL);
if (metapage_cache == NULL) if (metapage_cache == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -153,7 +153,7 @@ int __init metapage_init(void) ...@@ -153,7 +153,7 @@ int __init metapage_init(void)
((PAGE_SIZE << hash_order) / sizeof(void *)) < HASH_SIZE; ((PAGE_SIZE << hash_order) / sizeof(void *)) < HASH_SIZE;
hash_order++); hash_order++);
hash_table = hash_table =
(metapage_t **) __get_free_pages(GFP_KERNEL, hash_order); (struct metapage **) __get_free_pages(GFP_KERNEL, hash_order);
assert(hash_table); assert(hash_table);
memset(hash_table, 0, PAGE_SIZE << hash_order); memset(hash_table, 0, PAGE_SIZE << hash_order);
...@@ -169,7 +169,7 @@ void metapage_exit(void) ...@@ -169,7 +169,7 @@ void metapage_exit(void)
/* /*
* Basically same hash as in pagemap.h, but using our hash table * Basically same hash as in pagemap.h, but using our hash table
*/ */
static metapage_t **meta_hash(struct address_space *mapping, static struct metapage **meta_hash(struct address_space *mapping,
unsigned long index) unsigned long index)
{ {
#define i (((unsigned long)mapping)/ \ #define i (((unsigned long)mapping)/ \
...@@ -180,11 +180,11 @@ static metapage_t **meta_hash(struct address_space *mapping, ...@@ -180,11 +180,11 @@ static metapage_t **meta_hash(struct address_space *mapping,
#undef s #undef s
} }
static metapage_t *search_hash(metapage_t ** hash_ptr, static struct metapage *search_hash(struct metapage ** hash_ptr,
struct address_space *mapping, struct address_space *mapping,
unsigned long index) unsigned long index)
{ {
metapage_t *ptr; struct metapage *ptr;
for (ptr = *hash_ptr; ptr; ptr = ptr->hash_next) { for (ptr = *hash_ptr; ptr; ptr = ptr->hash_next) {
if ((ptr->mapping == mapping) && (ptr->index == index)) if ((ptr->mapping == mapping) && (ptr->index == index))
...@@ -194,7 +194,7 @@ static metapage_t *search_hash(metapage_t ** hash_ptr, ...@@ -194,7 +194,7 @@ static metapage_t *search_hash(metapage_t ** hash_ptr,
return NULL; return NULL;
} }
static void add_to_hash(metapage_t * mp, metapage_t ** hash_ptr) static void add_to_hash(struct metapage * mp, struct metapage ** hash_ptr)
{ {
if (*hash_ptr) if (*hash_ptr)
(*hash_ptr)->hash_prev = mp; (*hash_ptr)->hash_prev = mp;
...@@ -204,7 +204,7 @@ static void add_to_hash(metapage_t * mp, metapage_t ** hash_ptr) ...@@ -204,7 +204,7 @@ static void add_to_hash(metapage_t * mp, metapage_t ** hash_ptr)
*hash_ptr = mp; *hash_ptr = mp;
} }
static void remove_from_hash(metapage_t * mp, metapage_t ** hash_ptr) static void remove_from_hash(struct metapage * mp, struct metapage ** hash_ptr)
{ {
if (mp->hash_prev) if (mp->hash_prev)
mp->hash_prev->hash_next = mp->hash_next; mp->hash_prev->hash_next = mp->hash_next;
...@@ -217,15 +217,15 @@ static void remove_from_hash(metapage_t * mp, metapage_t ** hash_ptr) ...@@ -217,15 +217,15 @@ static void remove_from_hash(metapage_t * mp, metapage_t ** hash_ptr)
mp->hash_next->hash_prev = mp->hash_prev; mp->hash_next->hash_prev = mp->hash_prev;
} }
metapage_t *__get_metapage(struct inode *inode, struct metapage *__get_metapage(struct inode *inode, unsigned long lblock,
unsigned long lblock, unsigned int size, unsigned int size, int absolute,
int absolute, unsigned long new) unsigned long new)
{ {
metapage_t **hash_ptr; struct metapage **hash_ptr;
int l2BlocksPerPage; int l2BlocksPerPage;
int l2bsize; int l2bsize;
struct address_space *mapping; struct address_space *mapping;
metapage_t *mp; struct metapage *mp;
unsigned long page_index; unsigned long page_index;
unsigned long page_offset; unsigned long page_offset;
...@@ -289,7 +289,7 @@ metapage_t *__get_metapage(struct inode *inode, ...@@ -289,7 +289,7 @@ metapage_t *__get_metapage(struct inode *inode,
} }
} }
if (!mp) { if (!mp) {
metapage_t *mp2; struct metapage *mp2;
spin_unlock(&meta_lock); spin_unlock(&meta_lock);
mp = mempool_alloc(metapage_mempool, GFP_NOFS); mp = mempool_alloc(metapage_mempool, GFP_NOFS);
...@@ -358,7 +358,7 @@ metapage_t *__get_metapage(struct inode *inode, ...@@ -358,7 +358,7 @@ metapage_t *__get_metapage(struct inode *inode,
return NULL; return NULL;
} }
void hold_metapage(metapage_t * mp, int force) void hold_metapage(struct metapage * mp, int force)
{ {
spin_lock(&meta_lock); spin_lock(&meta_lock);
...@@ -374,7 +374,7 @@ void hold_metapage(metapage_t * mp, int force) ...@@ -374,7 +374,7 @@ void hold_metapage(metapage_t * mp, int force)
spin_unlock(&meta_lock); spin_unlock(&meta_lock);
} }
static void __write_metapage(metapage_t * mp) static void __write_metapage(struct metapage * mp)
{ {
int l2bsize = mp->mapping->host->i_blkbits; int l2bsize = mp->mapping->host->i_blkbits;
int l2BlocksPerPage = PAGE_CACHE_SHIFT - l2bsize; int l2BlocksPerPage = PAGE_CACHE_SHIFT - l2bsize;
...@@ -420,7 +420,7 @@ static void __write_metapage(metapage_t * mp) ...@@ -420,7 +420,7 @@ static void __write_metapage(metapage_t * mp)
jFYI(1, ("__write_metapage done\n")); jFYI(1, ("__write_metapage done\n"));
} }
static inline void sync_metapage(metapage_t *mp) static inline void sync_metapage(struct metapage *mp)
{ {
struct page *page = mp->page; struct page *page = mp->page;
...@@ -435,9 +435,9 @@ static inline void sync_metapage(metapage_t *mp) ...@@ -435,9 +435,9 @@ static inline void sync_metapage(metapage_t *mp)
page_cache_release(page); page_cache_release(page);
} }
void release_metapage(metapage_t * mp) void release_metapage(struct metapage * mp)
{ {
log_t *log; struct jfs_log *log;
jFYI(1, jFYI(1,
("release_metapage: mp = 0x%p, flag = 0x%lx\n", mp, ("release_metapage: mp = 0x%p, flag = 0x%lx\n", mp,
...@@ -502,11 +502,11 @@ void release_metapage(metapage_t * mp) ...@@ -502,11 +502,11 @@ void release_metapage(metapage_t * mp)
void __invalidate_metapages(struct inode *ip, s64 addr, int len) void __invalidate_metapages(struct inode *ip, s64 addr, int len)
{ {
metapage_t **hash_ptr; struct metapage **hash_ptr;
unsigned long lblock; unsigned long lblock;
int l2BlocksPerPage = PAGE_CACHE_SHIFT - ip->i_blkbits; int l2BlocksPerPage = PAGE_CACHE_SHIFT - ip->i_blkbits;
struct address_space *mapping = ip->i_mapping; struct address_space *mapping = ip->i_mapping;
metapage_t *mp; struct metapage *mp;
struct page *page; struct page *page;
/* /*
...@@ -538,11 +538,11 @@ void __invalidate_metapages(struct inode *ip, s64 addr, int len) ...@@ -538,11 +538,11 @@ void __invalidate_metapages(struct inode *ip, s64 addr, int len)
void invalidate_inode_metapages(struct inode *inode) void invalidate_inode_metapages(struct inode *inode)
{ {
struct list_head *ptr; struct list_head *ptr;
metapage_t *mp; struct metapage *mp;
spin_lock(&meta_lock); spin_lock(&meta_lock);
list_for_each(ptr, &JFS_IP(inode)->mp_list) { list_for_each(ptr, &JFS_IP(inode)->mp_list) {
mp = list_entry(ptr, metapage_t, inode_list); mp = list_entry(ptr, struct metapage, inode_list);
clear_bit(META_dirty, &mp->flag); clear_bit(META_dirty, &mp->flag);
set_bit(META_discard, &mp->flag); set_bit(META_discard, &mp->flag);
kunmap(mp->page); kunmap(mp->page);
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <linux/pagemap.h> #include <linux/pagemap.h>
typedef struct metapage { struct metapage {
/* Common logsyncblk prefix (see jfs_logmgr.h) */ /* Common logsyncblk prefix (see jfs_logmgr.h) */
u16 xflag; u16 xflag;
u16 unused; u16 unused;
...@@ -55,7 +55,7 @@ typedef struct metapage { ...@@ -55,7 +55,7 @@ typedef struct metapage {
int clsn; int clsn;
atomic_t nohomeok; atomic_t nohomeok;
struct jfs_log *log; struct jfs_log *log;
} metapage_t; };
/* metapage flag */ /* metapage flag */
#define META_locked 0 #define META_locked 0
...@@ -69,7 +69,7 @@ typedef struct metapage { ...@@ -69,7 +69,7 @@ typedef struct metapage {
#define mark_metapage_dirty(mp) set_bit(META_dirty, &(mp)->flag) #define mark_metapage_dirty(mp) set_bit(META_dirty, &(mp)->flag)
/* function prototypes */ /* function prototypes */
extern metapage_t *__get_metapage(struct inode *inode, extern struct metapage *__get_metapage(struct inode *inode,
unsigned long lblock, unsigned int size, unsigned long lblock, unsigned int size,
int absolute, unsigned long new); int absolute, unsigned long new);
...@@ -79,22 +79,22 @@ extern metapage_t *__get_metapage(struct inode *inode, ...@@ -79,22 +79,22 @@ extern metapage_t *__get_metapage(struct inode *inode,
#define get_metapage(inode, lblock, size, absolute)\ #define get_metapage(inode, lblock, size, absolute)\
__get_metapage(inode, lblock, size, absolute, TRUE) __get_metapage(inode, lblock, size, absolute, TRUE)
extern void release_metapage(metapage_t *); extern void release_metapage(struct metapage *);
extern void hold_metapage(metapage_t *, int); extern void hold_metapage(struct metapage *, int);
static inline void write_metapage(metapage_t *mp) static inline void write_metapage(struct metapage *mp)
{ {
set_bit(META_dirty, &mp->flag); set_bit(META_dirty, &mp->flag);
release_metapage(mp); release_metapage(mp);
} }
static inline void flush_metapage(metapage_t *mp) static inline void flush_metapage(struct metapage *mp)
{ {
set_bit(META_sync, &mp->flag); set_bit(META_sync, &mp->flag);
write_metapage(mp); write_metapage(mp);
} }
static inline void discard_metapage(metapage_t *mp) static inline void discard_metapage(struct metapage *mp)
{ {
clear_bit(META_dirty, &mp->flag); clear_bit(META_dirty, &mp->flag);
set_bit(META_discard, &mp->flag); set_bit(META_discard, &mp->flag);
......
...@@ -249,7 +249,7 @@ int jfs_mount(struct super_block *sb) ...@@ -249,7 +249,7 @@ int jfs_mount(struct super_block *sb)
int jfs_mount_rw(struct super_block *sb, int remount) int jfs_mount_rw(struct super_block *sb, int remount)
{ {
struct jfs_sb_info *sbi = JFS_SBI(sb); struct jfs_sb_info *sbi = JFS_SBI(sb);
log_t *log; struct jfs_log *log;
int rc; int rc;
/* /*
...@@ -506,8 +506,8 @@ int readSuper(struct super_block *sb, struct buffer_head **bpp) ...@@ -506,8 +506,8 @@ int readSuper(struct super_block *sb, struct buffer_head **bpp)
*/ */
static int logMOUNT(struct super_block *sb) static int logMOUNT(struct super_block *sb)
{ {
log_t *log = JFS_SBI(sb)->log; struct jfs_log *log = JFS_SBI(sb)->log;
lrd_t lrd; struct lrd lrd;
lrd.logtid = 0; lrd.logtid = 0;
lrd.backchain = 0; lrd.backchain = 0;
......
This diff is collapsed.
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
/* /*
* transaction block * transaction block
*/ */
typedef struct tblock { struct tblock {
/* /*
* tblock_t and jbuf_t common area: struct logsyncblk * tblock and jbuf_t common area: struct logsyncblk
* *
* the following 5 fields are the same as struct logsyncblk * the following 5 fields are the same as struct logsyncblk
* which is common to tblock and jbuf to form logsynclist * which is common to tblock and jbuf to form logsynclist
...@@ -44,28 +44,26 @@ typedef struct tblock { ...@@ -44,28 +44,26 @@ typedef struct tblock {
struct list_head synclist; /* logsynclist link */ struct list_head synclist; /* logsynclist link */
/* lock management */ /* lock management */
struct super_block *sb; /* 4: super block */ struct super_block *sb; /* super block */
lid_t next; /* 2: index of first tlock of tid */ lid_t next; /* index of first tlock of tid */
lid_t last; /* 2: index of last tlock of tid */ lid_t last; /* index of last tlock of tid */
wait_queue_head_t waitor; /* 4: tids waiting on this tid */ wait_queue_head_t waitor; /* tids waiting on this tid */
/* log management */ /* log management */
u32 logtid; /* 4: log transaction id */ u32 logtid; /* log transaction id */
/* (32) */
/* commit management */ /* commit management */
struct tblock *cqnext; /* 4: commit queue link */ struct tblock *cqnext; /* commit queue link */
s32 clsn; /* 4: commit lsn */ s32 clsn; /* commit lsn */
struct lbuf *bp; /* 4: */ struct lbuf *bp;
s32 pn; /* 4: commit record log page number */ s32 pn; /* commit record log page number */
s32 eor; /* 4: commit record eor */ s32 eor; /* commit record eor */
wait_queue_head_t gcwait; /* 4: group commit event list: wait_queue_head_t gcwait; /* group commit event list:
* ready transactions wait on this * ready transactions wait on this
* event for group commit completion. * event for group commit completion.
*/ */
struct inode *ip; /* 4: inode being created or deleted */ struct inode *ip; /* inode being created or deleted */
s32 rsrvd; /* 4: */ };
} tblock_t; /* (64) */
extern struct tblock *TxBlock; /* transaction block table */ extern struct tblock *TxBlock; /* transaction block table */
...@@ -90,7 +88,7 @@ extern struct tblock *TxBlock; /* transaction block table */ ...@@ -90,7 +88,7 @@ extern struct tblock *TxBlock; /* transaction block table */
/* /*
* transaction lock * transaction lock
*/ */
typedef struct tlock { struct tlock {
lid_t next; /* index next lockword on tid locklist lid_t next; /* index next lockword on tid locklist
* next lockword on freelist * next lockword on freelist
*/ */
...@@ -104,7 +102,7 @@ typedef struct tlock { ...@@ -104,7 +102,7 @@ typedef struct tlock {
/* (16) */ /* (16) */
s16 lock[24]; /* 48: overlay area */ s16 lock[24]; /* 48: overlay area */
} tlock_t; /* (64) */ }; /* (64) */
extern struct tlock *TxLock; /* transaction lock table */ extern struct tlock *TxLock; /* transaction lock table */
...@@ -153,18 +151,18 @@ extern struct tlock *TxLock; /* transaction lock table */ ...@@ -153,18 +151,18 @@ extern struct tlock *TxLock; /* transaction lock table */
/* /*
* linelock for lmLog() * linelock for lmLog()
* *
* note: linelock_t and its variations are overlaid * note: linelock and its variations are overlaid
* at tlock.lock: watch for alignment; * at tlock.lock: watch for alignment;
*/ */
typedef struct { struct lv {
u8 offset; /* 1: */ u8 offset; /* 1: */
u8 length; /* 1: */ u8 length; /* 1: */
} lv_t; /* (2) */ }; /* (2) */
#define TLOCKSHORT 20 #define TLOCKSHORT 20
#define TLOCKLONG 28 #define TLOCKLONG 28
typedef struct { struct linelock {
u16 next; /* 2: next linelock */ u16 next; /* 2: next linelock */
s8 maxcnt; /* 1: */ s8 maxcnt; /* 1: */
...@@ -175,13 +173,12 @@ typedef struct { ...@@ -175,13 +173,12 @@ typedef struct {
u8 l2linesize; /* 1: log2 of linesize */ u8 l2linesize; /* 1: log2 of linesize */
/* (8) */ /* (8) */
lv_t lv[20]; /* 40: */ struct lv lv[20]; /* 40: */
} linelock_t; /* (48) */ }; /* (48) */
#define dtlock_t linelock_t #define dt_lock linelock
#define itlock_t linelock_t
typedef struct { struct xtlock {
u16 next; /* 2: */ u16 next; /* 2: */
s8 maxcnt; /* 1: */ s8 maxcnt; /* 1: */
...@@ -192,27 +189,27 @@ typedef struct { ...@@ -192,27 +189,27 @@ typedef struct {
u8 l2linesize; /* 1: log2 of linesize */ u8 l2linesize; /* 1: log2 of linesize */
/* (8) */ /* (8) */
lv_t header; /* 2: */ struct lv header; /* 2: */
lv_t lwm; /* 2: low water mark */ struct lv lwm; /* 2: low water mark */
lv_t hwm; /* 2: high water mark */ struct lv hwm; /* 2: high water mark */
lv_t twm; /* 2: */ struct lv twm; /* 2: */
/* (16) */ /* (16) */
s32 pxdlock[8]; /* 32: */ s32 pxdlock[8]; /* 32: */
} xtlock_t; /* (48) */ }; /* (48) */
/* /*
* maplock for txUpdateMap() * maplock for txUpdateMap()
* *
* note: maplock_t and its variations are overlaid * note: maplock and its variations are overlaid
* at tlock.lock/linelock: watch for alignment; * at tlock.lock/linelock: watch for alignment;
* N.B. next field may be set by linelock, and should not * N.B. next field may be set by linelock, and should not
* be modified by maplock; * be modified by maplock;
* N.B. index of the first pxdlock specifies index of next * N.B. index of the first pxdlock specifies index of next
* free maplock (i.e., number of maplock) in the tlock; * free maplock (i.e., number of maplock) in the tlock;
*/ */
typedef struct { struct maplock {
u16 next; /* 2: */ u16 next; /* 2: */
u8 maxcnt; /* 2: */ u8 maxcnt; /* 2: */
...@@ -224,7 +221,7 @@ typedef struct { ...@@ -224,7 +221,7 @@ typedef struct {
/* (8) */ /* (8) */
pxd_t pxd; /* 8: */ pxd_t pxd; /* 8: */
} maplock_t; /* (16): */ }; /* (16): */
/* maplock flag */ /* maplock flag */
#define mlckALLOC 0x00f0 #define mlckALLOC 0x00f0
...@@ -238,9 +235,9 @@ typedef struct { ...@@ -238,9 +235,9 @@ typedef struct {
#define mlckFREEXAD 0x0002 #define mlckFREEXAD 0x0002
#define mlckFREEPXD 0x0001 #define mlckFREEPXD 0x0001
#define pxdlock_t maplock_t #define pxd_lock maplock
typedef struct { struct xdlistlock {
u16 next; /* 2: */ u16 next; /* 2: */
u8 maxcnt; /* 2: */ u8 maxcnt; /* 2: */
...@@ -252,14 +249,14 @@ typedef struct { ...@@ -252,14 +249,14 @@ typedef struct {
/* (8) */ /* (8) */
/* /*
* We need xdlistlock_t to be 64 bits (8 bytes), regardless of * We need xdlist to be 64 bits (8 bytes), regardless of
* whether void * is 32 or 64 bits * whether void * is 32 or 64 bits
*/ */
union { union {
void *_xdlist; /* pxd/xad list */ void *_xdlist; /* pxd/xad list */
s64 pad; /* 8: Force 64-bit xdlist size */ s64 pad; /* 8: Force 64-bit xdlist size */
} union64; } union64;
} xdlistlock_t; /* (16): */ }; /* (16): */
#define xdlist union64._xdlist #define xdlist union64._xdlist
...@@ -268,26 +265,26 @@ typedef struct { ...@@ -268,26 +265,26 @@ typedef struct {
* *
* parameter to the commit manager routines * parameter to the commit manager routines
*/ */
typedef struct commit { struct commit {
tid_t tid; /* 4: tid = index of tblock */ tid_t tid; /* tid = index of tblock */
int flag; /* 4: flags */ int flag; /* flags */
log_t *log; /* 4: log */ struct jfs_log *log; /* log */
struct super_block *sb; /* 4: superblock */ struct super_block *sb; /* superblock */
int nip; /* 4: number of entries in iplist */ int nip; /* number of entries in iplist */
struct inode **iplist; /* 4: list of pointers to inodes */ struct inode **iplist; /* list of pointers to inodes */
/* (32) */
/* log record descriptor on 64-bit boundary */ /* log record descriptor on 64-bit boundary */
lrd_t lrd; /* : log record descriptor */ struct lrd lrd; /* : log record descriptor */
} commit_t; };
/* /*
* external declarations * external declarations
*/ */
extern tlock_t *txLock(tid_t tid, struct inode *ip, struct metapage *mp, int flag); extern struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage *mp,
int flag);
extern tlock_t *txMaplock(tid_t tid, struct inode *ip, int flag); extern struct tlock *txMaplock(tid_t tid, struct inode *ip, int flag);
extern int txCommit(tid_t tid, int nip, struct inode **iplist, int flag); extern int txCommit(tid_t tid, int nip, struct inode **iplist, int flag);
...@@ -299,16 +296,17 @@ extern void txEnd(tid_t tid); ...@@ -299,16 +296,17 @@ extern void txEnd(tid_t tid);
extern void txAbort(tid_t tid, int dirty); extern void txAbort(tid_t tid, int dirty);
extern linelock_t *txLinelock(linelock_t * tlock); extern struct linelock *txLinelock(struct linelock * tlock);
extern void txFreeMap(struct inode *ip, extern void txFreeMap(struct inode *ip, struct maplock * maplock,
maplock_t * maplock, tblock_t * tblk, int maptype); struct tblock * tblk, int maptype);
extern void txEA(tid_t tid, struct inode *ip, dxd_t * oldea, dxd_t * newea); extern void txEA(tid_t tid, struct inode *ip, dxd_t * oldea, dxd_t * newea);
extern void txFreelock(struct inode *ip); extern void txFreelock(struct inode *ip);
extern int lmLog(log_t * log, tblock_t * tblk, lrd_t * lrd, tlock_t * tlck); extern int lmLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
struct tlock * tlck);
extern void txQuiesce(struct super_block *sb); extern void txQuiesce(struct super_block *sb);
......
...@@ -81,11 +81,11 @@ typedef struct { ...@@ -81,11 +81,11 @@ typedef struct {
( ((s64)((lxd)->off1)) << 32 | (lxd)->off2 ) ( ((s64)((lxd)->off1)) << 32 | (lxd)->off2 )
/* lxd list */ /* lxd list */
typedef struct { struct lxdlist {
s16 maxnlxd; s16 maxnlxd;
s16 nlxd; s16 nlxd;
lxd_t *lxd; lxd_t *lxd;
} lxdlist_t; };
/* /*
* physical xd (pxd) * physical xd (pxd)
...@@ -111,11 +111,11 @@ typedef struct { ...@@ -111,11 +111,11 @@ typedef struct {
( ((s64)((pxd)->addr1)) << 32 | __le32_to_cpu((pxd)->addr2)) ( ((s64)((pxd)->addr1)) << 32 | __le32_to_cpu((pxd)->addr2))
/* pxd list */ /* pxd list */
typedef struct { struct pxdlist {
s16 maxnpxd; s16 maxnpxd;
s16 npxd; s16 npxd;
pxd_t pxd[8]; pxd_t pxd[8];
} pxdlist_t; };
/* /*
...@@ -150,16 +150,16 @@ typedef struct { ...@@ -150,16 +150,16 @@ typedef struct {
/* /*
* directory entry argument * directory entry argument
*/ */
typedef struct component_name { struct component_name {
int namlen; int namlen;
wchar_t *name; wchar_t *name;
} component_t; };
/* /*
* DASD limit information - stored in directory inode * DASD limit information - stored in directory inode
*/ */
typedef struct dasd { struct dasd {
u8 thresh; /* Alert Threshold (in percent) */ u8 thresh; /* Alert Threshold (in percent) */
u8 delta; /* Alert Threshold delta (in percent) */ u8 delta; /* Alert Threshold delta (in percent) */
u8 rsrvd1; u8 rsrvd1;
...@@ -168,7 +168,7 @@ typedef struct dasd { ...@@ -168,7 +168,7 @@ typedef struct dasd {
u8 rsrvd2[3]; u8 rsrvd2[3];
u8 used_hi; /* DASD usage (in logical blocks) */ u8 used_hi; /* DASD usage (in logical blocks) */
u32 used_lo; /* DASD usage (in logical blocks) */ u32 used_lo; /* DASD usage (in logical blocks) */
} dasd_t; };
#define DASDLIMIT(dasdp) \ #define DASDLIMIT(dasdp) \
(((u64)((dasdp)->limit_hi) << 32) + __le32_to_cpu((dasdp)->limit_lo)) (((u64)((dasdp)->limit_hi) << 32) + __le32_to_cpu((dasdp)->limit_lo))
......
...@@ -55,7 +55,7 @@ int jfs_umount(struct super_block *sb) ...@@ -55,7 +55,7 @@ int jfs_umount(struct super_block *sb)
struct inode *ipimap = sbi->ipimap; struct inode *ipimap = sbi->ipimap;
struct inode *ipaimap = sbi->ipaimap; struct inode *ipaimap = sbi->ipaimap;
struct inode *ipaimap2 = sbi->ipaimap2; struct inode *ipaimap2 = sbi->ipaimap2;
log_t *log; struct jfs_log *log;
int rc = 0; int rc = 0;
jFYI(1, ("\n UnMount JFS: sb:0x%p\n", sb)); jFYI(1, ("\n UnMount JFS: sb:0x%p\n", sb));
...@@ -143,7 +143,7 @@ int jfs_umount_rw(struct super_block *sb) ...@@ -143,7 +143,7 @@ int jfs_umount_rw(struct super_block *sb)
{ {
struct address_space *bdev_mapping = sb->s_bdev->bd_inode->i_mapping; struct address_space *bdev_mapping = sb->s_bdev->bd_inode->i_mapping;
struct jfs_sb_info *sbi = JFS_SBI(sb); struct jfs_sb_info *sbi = JFS_SBI(sb);
log_t *log = sbi->log; struct jfs_log *log = sbi->log;
if (!log) if (!log)
return 0; return 0;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment