#
PKG_MAJOR=1
PKG_MINOR=3
-PKG_REVISION=14
+PKG_REVISION=15
PKG_BUILD=0
-xfsprogs (1.3.14-1) unstable; urgency=low
+xfsprogs (1.3.15-1) unstable; urgency=low
- * Fix minor package version numbering issue (closes: #117545)
- * Fix bug in mkfs.xfs device size cross-check for realtime device
+ * Fix minor package version numbering issue (closes: #117545)
+ * Fix bug in mkfs.xfs device size cross-check for realtime device
+ * Reenable use of the BLKBSZSET ioctl in libxfs
- -- Nathan Scott <nathans@debian.org> Wed, 5 Dec 2001 17:13:06 +1100
+ -- Nathan Scott <nathans@debian.org> Wed, 12 Dec 2001 09:25:42 +1100
xfsprogs (1.3.13-0) unstable; urgency=low
+xfsprogs-1.3.15 (12 December 2001)
+ - reenable the use of the BLKBSZSET ioctl, its baaack
+ - sync recent XFS kernel source changes back into libxfs
+
xfsprogs-1.3.14 (05 December 2001)
- fix minor debian package version numbering issue
- add documentation for xfs_db(8) label/uuid commands
extern xfs_mount_t *libxfs_mount (xfs_mount_t *, xfs_sb_t *,
dev_t, dev_t, dev_t, int);
extern void libxfs_mount_common (xfs_mount_t *, xfs_sb_t *);
+extern void libxfs_initialize_perag (xfs_mount_t *, int);
extern void libxfs_umount (xfs_mount_t *);
extern int libxfs_rtmount_init (xfs_mount_t *);
extern void libxfs_alloc_compute_maxlevels (xfs_mount_t *);
progname, path, strerror(errno));
exit(1);
}
-
-#ifdef HAVE_BLKBSZSET
+
/*
- * Set device blocksize to 512 bytes
- *
- * See bug #801063, but we no longer have this ioctl in the kernel -
- * it will be needed again though when the fs blocksize != pagesize.
+ * Set device blocksize to 512 bytes (see bug #801063)
*/
#ifndef BLKBSZSET
-#define BLKBSZSET _IO(0x12,110) /* set device block size */
+#define BLKBSZSET _IOW(0x12,113,sizeof(int)) /* set device block size */
#endif
if (!readonly && setblksize && (statb.st_mode & S_IFMT) == S_IFBLK) {
int blocksize = 512; /* bytes */
progname, path, strerror(errno));
}
}
-#endif
- /* get the device number from the stat buf - unless
+ /*
+ * Get the device number from the stat buf - unless
* we're not opening a real device, in which case
- * choose a new fake device number
+ * choose a new fake device number.
*/
dev=(statb.st_rdev)?(statb.st_rdev):(nextfakedev--);
exit(1);
}
+ libxfs_initialize_perag(mp, sbp->sb_agcount);
+
/*
* mkfs calls mount before the root inode is allocated.
*/
#define xfs_dir2_bogus_removename libxfs_dir2_bogus_removename
#define xfs_mount_common libxfs_mount_common
+#define xfs_initialize_perag libxfs_initialize_perag
#define xfs_rtmount_init libxfs_rtmount_init
#define xfs_alloc_fix_freelist libxfs_alloc_fix_freelist
#define xfs_iread libxfs_iread
}
}
+
+void
+xfs_initialize_perag(xfs_mount_t *mp, int agcount)
+{
+ int index, max_metadata;
+ xfs_perag_t *pag;
+ xfs_agino_t agino;
+ xfs_ino_t ino;
+ xfs_sb_t *sbp = &mp->m_sb;
+ xfs_ino_t max_inum = XFS_MAXINUMBER_32;
+
+ /* Check to see if the filesystem can overflow 32 bit inodes */
+ agino = XFS_OFFBNO_TO_AGINO(mp, sbp->sb_agblocks - 1, 0);
+ ino = XFS_AGINO_TO_INO(mp, agcount - 1, agino);
+
+ /* Clear the mount flag if no inode can overflow 32 bits
+ * on this filesystem.
+ */
+ if (ino <= max_inum) {
+ mp->m_flags &= ~XFS_MOUNT_32BITINODES;
+ }
+
+ /* If we can overflow then setup the ag headers accordingly */
+ if (mp->m_flags & XFS_MOUNT_32BITINODES) {
+ /* Calculate how much should be reserved for inodes to
+ * meet the max inode percentage.
+ */
+ if (mp->m_maxicount) {
+ __uint64_t icount;
+
+ icount = sbp->sb_dblocks * sbp->sb_imax_pct;
+ do_div(icount, 100);
+ icount += sbp->sb_agblocks - 1;
+ do_div(icount, mp->m_ialloc_blks);
+ max_metadata = icount;
+ } else {
+ max_metadata = agcount;
+ }
+ for (index = 0; index < agcount; index++) {
+ ino = XFS_AGINO_TO_INO(mp, index, agino);
+ if (ino > max_inum) {
+ index++;
+ break;
+ }
+
+ /* This ag is prefered for inodes */
+ pag = &mp->m_perag[index];
+ pag->pagi_inodeok = 1;
+ if (index < max_metadata)
+ pag->pagf_metadata = 1;
+ }
+ } else {
+ /* Setup default behavior for smaller filesystems */
+ for (index = 0; index < agcount; index++) {
+ pag = &mp->m_perag[index];
+ pag->pagi_inodeok = 1;
+ }
+ }
+ mp->m_maxagi = index;
+}
+