#define XFS_UQUOTA_ACTIVE 0x0080 /* uquotas are being turned off */
#define XFS_GQUOTA_ACTIVE 0x0100 /* gquotas are being turned off */
-/*
- * Typically, we turn quotas off if we weren't explicitly asked to
- * mount quotas. This is the mount option not to do that.
- * This option is handy in the miniroot, when trying to mount /root.
- * We can't really know what's in /etc/fstab until /root is already mounted!
- * This stops quotas getting turned off in the root filesystem everytime
- * the system boots up a miniroot.
- */
-#define XFS_QUOTA_MAYBE 0x0200 /* Turn quotas on if SB has quotas on */
-
/*
* Checking XFS_IS_*QUOTA_ON() while holding any inode lock guarantees
* quota will be not be switched off as long as that inode lock is held.
xfs_lsn_t tail_lsn;
int hblks;
- found = error = 0;
+ found = 0;
/*
* Find previous log record
* Search backwards looking for log record header block
*/
ASSERT(*head_blk < INT_MAX);
- for (i=(int)(*head_blk)-1; i>=0; i--) {
+ for (i = (int)(*head_blk) - 1; i >= 0; i--) {
if ((error = xlog_bread(log, i, 1, bp)))
goto bread_err;
- if (INT_GET(*(uint *)(XFS_BUF_PTR(bp)), ARCH_CONVERT) == XLOG_HEADER_MAGIC_NUM) {
+ if (XLOG_HEADER_MAGIC_NUM ==
+ INT_GET(*(uint *)(XFS_BUF_PTR(bp)), ARCH_CONVERT)) {
found = 1;
break;
}
* the previous code.
*/
if (!found) {
- for (i=log->l_logBBsize-1; i>=(int)(*head_blk); i--) {
+ for (i = log->l_logBBsize - 1; i >= (int)(*head_blk); i--) {
if ((error = xlog_bread(log, i, 1, bp)))
goto bread_err;
- if (INT_GET(*(uint*)(XFS_BUF_PTR(bp)), ARCH_CONVERT) == XLOG_HEADER_MAGIC_NUM) {
+ if (XLOG_HEADER_MAGIC_NUM ==
+ INT_GET(*(uint*)(XFS_BUF_PTR(bp)), ARCH_CONVERT)) {
found = 2;
break;
}
if (XFS_SB_VERSION_HASLOGV2(&log->l_mp->m_sb)) {
int h_size = INT_GET(rhead->h_size, ARCH_CONVERT);
int h_version = INT_GET(rhead->h_version, ARCH_CONVERT);
- if ((h_version && XLOG_VERSION_2) &&
+
+ if ((h_version & XLOG_VERSION_2) &&
(h_size > XLOG_HEADER_CYCLE_SIZE)) {
hblks = h_size / XLOG_HEADER_CYCLE_SIZE;
if (h_size % XLOG_HEADER_CYCLE_SIZE)
} else {
hblks = 1;
}
- after_umount_blk = (i + hblks +
- (int)BTOBB(INT_GET(rhead->h_len, ARCH_CONVERT))) % log->l_logBBsize;
+ after_umount_blk = (i + hblks + (int)
+ BTOBB(INT_GET(rhead->h_len, ARCH_CONVERT))) % log->l_logBBsize;
tail_lsn = log->l_tail_lsn;
- if (*head_blk == after_umount_blk && INT_GET(rhead->h_num_logops, ARCH_CONVERT) == 1) {
+ if (*head_blk == after_umount_blk &&
+ INT_GET(rhead->h_num_logops, ARCH_CONVERT) == 1) {
umount_data_blk = (i + hblks) % log->l_logBBsize;
if ((error = xlog_bread(log, umount_data_blk, 1, bp))) {
goto bread_err;