From: Nathan Scott Date: Tue, 12 Mar 2002 02:35:54 +0000 (+0000) Subject: bump minor version to pick up Erics BLKGETSIZE change from awhile ago and X-Git-Tag: v2.1.0~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=044fe07851c5123959af121d3f25a6195a0f9fce;p=thirdparty%2Fxfsprogs-dev.git bump minor version to pick up Erics BLKGETSIZE change from awhile ago and sync userspace and kernel code up (minor changes only, doesn't affect user tools at all). --- diff --git a/VERSION b/VERSION index 946740663..1772b38fb 100644 --- a/VERSION +++ b/VERSION @@ -3,5 +3,5 @@ # PKG_MAJOR=2 PKG_MINOR=0 -PKG_REVISION=0 +PKG_REVISION=1 PKG_BUILD=0 diff --git a/debian/changelog b/debian/changelog index dc6bd81aa..1b439cab7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xfsprogs (2.0.1-1) unstable; urgency=low + + * New upstream bugfix (minor) release + + -- Nathan Scott Tue, 12 Mar 2002 13:25:32 +1100 + xfsprogs (2.0.0-1) unstable; urgency=low * New upstream release with support for new libhandle interfaces diff --git a/doc/CHANGES b/doc/CHANGES index 6f563171e..bd5835089 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,5 +1,6 @@ -cvs +xfsprogs-2.0.1 (12 March 2002) - Fall back to BLKGETSIZE if BLKGETSIZE64 fails + - Sync user/kernel headers and shared code xfsprogs-2.0.0 (26 February 2002) - Major release to coincide with switch to new extended diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in index 2390eb912..9dbc8ee17 100644 --- a/include/platform_defs.h.in +++ b/include/platform_defs.h.in @@ -77,11 +77,19 @@ typedef char* xfs_caddr_t; typedef unsigned char uchar_t; /* long and pointer must be either 32 bit or 64 bit */ -#undef HAVE_64BIT_LONG #undef HAVE_32BIT_LONG +#undef HAVE_64BIT_LONG #undef HAVE_32BIT_PTR #undef HAVE_64BIT_PTR +#if defined(HAVE_32BIT_LONG) +# define BITS_PER_LONG 32 +#elif defined(HAVE_64BIT_LONG) +# define BITS_PER_LONG 64 +#else +# error Unknown long size +#endif + /* Check if __psint_t is set to something meaningful */ #undef HAVE___PSINT_T #ifndef HAVE___PSINT_T diff --git a/include/xfs_ag.h b/include/xfs_ag.h index 6b803af43..5fd7dba11 100644 --- a/include/xfs_ag.h +++ b/include/xfs_ag.h @@ -225,9 +225,9 @@ typedef struct xfs_perag xfs_agino_t pagi_freecount; /* number of free inodes */ #ifdef __KERNEL__ lock_t pagb_lock; /* lock for pagb_list */ +#endif int pagb_count; /* pagb slots in use */ xfs_perag_busy_t *pagb_list; /* unstable blocks */ -#endif } xfs_perag_t; #define XFS_AG_MIN_BYTES (1LL << 24) /* 16 MB */ diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c index 9cdcbc2c1..897aa5761 100644 --- a/libxfs/rdwr.c +++ b/libxfs/rdwr.c @@ -366,13 +366,13 @@ libxfs_malloc(size_t size) { void *ptr; - if ((ptr = malloc(size)) == NULL) { - fprintf(stderr, "%s: malloc failed (%d bytes): %s\n", + if ((ptr = calloc(1, size)) == NULL) { + fprintf(stderr, "%s: calloc failed (%d bytes): %s\n", progname, (int)size, strerror(errno)); exit(1); } #ifdef MEM_DEBUG - fprintf(stderr, "## malloc'd item %p size %d bytes\n", + fprintf(stderr, "## calloc'd item %p size %d bytes\n", ptr, size); #endif return ptr; diff --git a/libxfs/xfs.h b/libxfs/xfs.h index a1ecf1415..6d486b7e0 100644 --- a/libxfs/xfs.h +++ b/libxfs/xfs.h @@ -192,6 +192,7 @@ #define kmem_zone_zalloc(z, f) libxfs_zone_zalloc(z) #define kmem_zone_free(z, p) libxfs_zone_free(z, p) #define kmem_realloc(p,sz,u,f) libxfs_realloc(p,sz) +#define kmem_zalloc(size, f) libxfs_malloc(size) #define kmem_alloc(size, f) libxfs_malloc(size) #define kmem_free(p, size) libxfs_free(p) @@ -280,7 +281,7 @@ typedef struct { dev_t dev; } buftarg_t; __res; }) #include -#define NBPP PAGE_SIZE +#define NBPP PAGE_SIZE static inline int atomicIncWithWrap(int *a, int b) { diff --git a/libxfs/xfs_alloc.c b/libxfs/xfs_alloc.c index 28f3cab4d..28fe364ff 100644 --- a/libxfs/xfs_alloc.c +++ b/libxfs/xfs_alloc.c @@ -2151,6 +2151,8 @@ xfs_alloc_read_agf( pag->pagf_levels[XFS_BTNUM_CNTi] = INT_GET(agf->agf_levels[XFS_BTNUM_CNTi], ARCH_CONVERT); spinlock_init(&pag->pagb_lock, "xfspagb"); + pag->pagb_list = kmem_zalloc(XFS_PAGB_NUM_SLOTS * + sizeof(xfs_perag_busy_t), KM_SLEEP); pag->pagf_init = 1; } #ifdef DEBUG