aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_log.c154
-rw-r--r--fs/xfs/xfs_log_priv.h2
-rw-r--r--fs/xfs/xfs_trans.c43
-rw-r--r--fs/xfs/xfs_vfsops.c8
4 files changed, 39 insertions, 168 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index a9e0c38d18a4..29af51275ca9 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -111,8 +111,7 @@ STATIC xlog_ticket_t *xlog_ticket_get(xlog_t *log,
111 uint flags); 111 uint flags);
112STATIC void xlog_ticket_put(xlog_t *log, xlog_ticket_t *ticket); 112STATIC void xlog_ticket_put(xlog_t *log, xlog_ticket_t *ticket);
113 113
114/* local debug functions */ 114#if defined(DEBUG)
115#if defined(DEBUG) && !defined(XLOG_NOLOG)
116STATIC void xlog_verify_dest_ptr(xlog_t *log, __psint_t ptr); 115STATIC void xlog_verify_dest_ptr(xlog_t *log, __psint_t ptr);
117STATIC void xlog_verify_grant_head(xlog_t *log, int equals); 116STATIC void xlog_verify_grant_head(xlog_t *log, int equals);
118STATIC void xlog_verify_iclog(xlog_t *log, xlog_in_core_t *iclog, 117STATIC void xlog_verify_iclog(xlog_t *log, xlog_in_core_t *iclog,
@@ -128,26 +127,7 @@ STATIC void xlog_verify_tail_lsn(xlog_t *log, xlog_in_core_t *iclog,
128 127
129STATIC int xlog_iclogs_empty(xlog_t *log); 128STATIC int xlog_iclogs_empty(xlog_t *log);
130 129
131#ifdef DEBUG
132int xlog_do_error = 0;
133int xlog_req_num = 0;
134int xlog_error_mod = 33;
135#endif
136
137#define XLOG_FORCED_SHUTDOWN(log) (log->l_flags & XLOG_IO_ERROR)
138
139/*
140 * 0 => disable log manager
141 * 1 => enable log manager
142 * 2 => enable log manager and log debugging
143 */
144#if defined(XLOG_NOLOG) || defined(DEBUG)
145int xlog_debug = 1;
146xfs_buftarg_t *xlog_target;
147#endif
148
149#if defined(XFS_LOG_TRACE) 130#if defined(XFS_LOG_TRACE)
150
151void 131void
152xlog_trace_loggrant(xlog_t *log, xlog_ticket_t *tic, xfs_caddr_t string) 132xlog_trace_loggrant(xlog_t *log, xlog_ticket_t *tic, xfs_caddr_t string)
153{ 133{
@@ -183,31 +163,16 @@ xlog_trace_loggrant(xlog_t *log, xlog_ticket_t *tic, xfs_caddr_t string)
183void 163void
184xlog_trace_iclog(xlog_in_core_t *iclog, uint state) 164xlog_trace_iclog(xlog_in_core_t *iclog, uint state)
185{ 165{
186 pid_t pid;
187
188 pid = current_pid();
189
190 if (!iclog->ic_trace) 166 if (!iclog->ic_trace)
191 iclog->ic_trace = ktrace_alloc(256, KM_SLEEP); 167 iclog->ic_trace = ktrace_alloc(256, KM_SLEEP);
192 ktrace_enter(iclog->ic_trace, 168 ktrace_enter(iclog->ic_trace,
193 (void *)((unsigned long)state), 169 (void *)((unsigned long)state),
194 (void *)((unsigned long)pid), 170 (void *)((unsigned long)current_pid()),
195 (void *)0, 171 (void *)NULL, (void *)NULL, (void *)NULL, (void *)NULL,
196 (void *)0, 172 (void *)NULL, (void *)NULL, (void *)NULL, (void *)NULL,
197 (void *)0, 173 (void *)NULL, (void *)NULL, (void *)NULL, (void *)NULL,
198 (void *)0, 174 (void *)NULL, (void *)NULL);
199 (void *)0,
200 (void *)0,
201 (void *)0,
202 (void *)0,
203 (void *)0,
204 (void *)0,
205 (void *)0,
206 (void *)0,
207 (void *)0,
208 (void *)0);
209} 175}
210
211#else 176#else
212#define xlog_trace_loggrant(log,tic,string) 177#define xlog_trace_loggrant(log,tic,string)
213#define xlog_trace_iclog(iclog,state) 178#define xlog_trace_iclog(iclog,state)
@@ -244,11 +209,6 @@ xfs_log_done(xfs_mount_t *mp,
244 xlog_ticket_t *ticket = (xfs_log_ticket_t) xtic; 209 xlog_ticket_t *ticket = (xfs_log_ticket_t) xtic;
245 xfs_lsn_t lsn = 0; 210 xfs_lsn_t lsn = 0;
246 211
247#if defined(DEBUG) || defined(XLOG_NOLOG)
248 if (!xlog_debug && xlog_target == log->l_targ)
249 return 0;
250#endif
251
252 if (XLOG_FORCED_SHUTDOWN(log) || 212 if (XLOG_FORCED_SHUTDOWN(log) ||
253 /* 213 /*
254 * If nothing was ever written, don't write out commit record. 214 * If nothing was ever written, don't write out commit record.
@@ -316,11 +276,6 @@ _xfs_log_force(
316 if (!log_flushed) 276 if (!log_flushed)
317 log_flushed = &dummy; 277 log_flushed = &dummy;
318 278
319#if defined(DEBUG) || defined(XLOG_NOLOG)
320 if (!xlog_debug && xlog_target == log->l_targ)
321 return 0;
322#endif
323
324 ASSERT(flags & XFS_LOG_FORCE); 279 ASSERT(flags & XFS_LOG_FORCE);
325 280
326 XFS_STATS_INC(xs_log_force); 281 XFS_STATS_INC(xs_log_force);
@@ -348,10 +303,6 @@ xfs_log_notify(xfs_mount_t *mp, /* mount of partition */
348 xlog_in_core_t *iclog = (xlog_in_core_t *)iclog_hndl; 303 xlog_in_core_t *iclog = (xlog_in_core_t *)iclog_hndl;
349 int abortflg, spl; 304 int abortflg, spl;
350 305
351#if defined(DEBUG) || defined(XLOG_NOLOG)
352 if (!xlog_debug && xlog_target == log->l_targ)
353 return 0;
354#endif
355 cb->cb_next = NULL; 306 cb->cb_next = NULL;
356 spl = LOG_LOCK(log); 307 spl = LOG_LOCK(log);
357 abortflg = (iclog->ic_state & XLOG_STATE_IOERROR); 308 abortflg = (iclog->ic_state & XLOG_STATE_IOERROR);
@@ -402,13 +353,8 @@ xfs_log_reserve(xfs_mount_t *mp,
402{ 353{
403 xlog_t *log = mp->m_log; 354 xlog_t *log = mp->m_log;
404 xlog_ticket_t *internal_ticket; 355 xlog_ticket_t *internal_ticket;
405 int retval; 356 int retval = 0;
406 357
407#if defined(DEBUG) || defined(XLOG_NOLOG)
408 if (!xlog_debug && xlog_target == log->l_targ)
409 return 0;
410#endif
411 retval = 0;
412 ASSERT(client == XFS_TRANSACTION || client == XFS_LOG); 358 ASSERT(client == XFS_TRANSACTION || client == XFS_LOG);
413 ASSERT((flags & XFS_LOG_NOSLEEP) == 0); 359 ASSERT((flags & XFS_LOG_NOSLEEP) == 0);
414 360
@@ -470,13 +416,6 @@ xfs_log_mount(xfs_mount_t *mp,
470 416
471 mp->m_log = xlog_alloc_log(mp, log_target, blk_offset, num_bblks); 417 mp->m_log = xlog_alloc_log(mp, log_target, blk_offset, num_bblks);
472 418
473#if defined(DEBUG) || defined(XLOG_NOLOG)
474 if (!xlog_debug) {
475 cmn_err(CE_NOTE, "logdev: %s", mp->m_logname ?
476 mp->m_logname : "internal");
477 return 0;
478 }
479#endif
480 /* 419 /*
481 * skip log recovery on a norecovery mount. pretend it all 420 * skip log recovery on a norecovery mount. pretend it all
482 * just worked. 421 * just worked.
@@ -580,11 +519,6 @@ xfs_log_unmount_write(xfs_mount_t *mp)
580 __uint32_t pad2; /* may as well make it 64 bits */ 519 __uint32_t pad2; /* may as well make it 64 bits */
581 } magic = { XLOG_UNMOUNT_TYPE, 0, 0 }; 520 } magic = { XLOG_UNMOUNT_TYPE, 0, 0 };
582 521
583#if defined(DEBUG) || defined(XLOG_NOLOG)
584 if (!xlog_debug && xlog_target == log->l_targ)
585 return 0;
586#endif
587
588 /* 522 /*
589 * Don't write out unmount record on read-only mounts. 523 * Don't write out unmount record on read-only mounts.
590 * Or, if we are doing a forced umount (typically because of IO errors). 524 * Or, if we are doing a forced umount (typically because of IO errors).
@@ -711,12 +645,6 @@ xfs_log_write(xfs_mount_t * mp,
711 int error; 645 int error;
712 xlog_t *log = mp->m_log; 646 xlog_t *log = mp->m_log;
713 647
714#if defined(DEBUG) || defined(XLOG_NOLOG)
715 if (!xlog_debug && xlog_target == log->l_targ) {
716 *start_lsn = 0;
717 return 0;
718 }
719#endif
720 if (XLOG_FORCED_SHUTDOWN(log)) 648 if (XLOG_FORCED_SHUTDOWN(log))
721 return XFS_ERROR(EIO); 649 return XFS_ERROR(EIO);
722 650
@@ -736,11 +664,6 @@ xfs_log_move_tail(xfs_mount_t *mp,
736 int need_bytes, free_bytes, cycle, bytes; 664 int need_bytes, free_bytes, cycle, bytes;
737 SPLDECL(s); 665 SPLDECL(s);
738 666
739#if defined(DEBUG) || defined(XLOG_NOLOG)
740 if (!xlog_debug && xlog_target == log->l_targ)
741 return;
742#endif
743 /* XXXsup tmp */
744 if (XLOG_FORCED_SHUTDOWN(log)) 667 if (XLOG_FORCED_SHUTDOWN(log))
745 return; 668 return;
746 ASSERT(!XFS_FORCED_SHUTDOWN(mp)); 669 ASSERT(!XFS_FORCED_SHUTDOWN(mp));
@@ -1027,51 +950,22 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
1027 int size; 950 int size;
1028 int xhdrs; 951 int xhdrs;
1029 952
1030#if defined(DEBUG) || defined(XLOG_NOLOG) 953 if (mp->m_logbufs <= 0) {
1031 /* 954 if (xfs_physmem <= btoc(128*1024*1024)) {
1032 * When logbufs == 0, someone has disabled the log from the FSTAB 955 log->l_iclog_bufs = XLOG_MIN_ICLOGS;
1033 * file. This is not a documented feature. We need to set xlog_debug 956 } else if (xfs_physmem <= btoc(400*1024*1024)) {
1034 * to zero (this deactivates the log) and set xlog_target to the 957 log->l_iclog_bufs = XLOG_MED_ICLOGS;
1035 * appropriate device. Only one filesystem may be affected as such 958 } else { /* 256K with 32K bufs */
1036 * since this is just a performance hack to test what we might be able 959 log->l_iclog_bufs = XLOG_MAX_ICLOGS;
1037 * to get if the log were not present.
1038 */
1039 if (mp->m_logbufs == 0) {
1040 xlog_debug = 0;
1041 xlog_target = log->l_targ;
1042 log->l_iclog_bufs = XLOG_MIN_ICLOGS;
1043 } else
1044#endif
1045 {
1046 /*
1047 * This is the normal path. If m_logbufs == -1, then the
1048 * admin has chosen to use the system defaults for logbuffers.
1049 */
1050 if (mp->m_logbufs == -1) {
1051 if (xfs_physmem <= btoc(128*1024*1024)) {
1052 log->l_iclog_bufs = XLOG_MIN_ICLOGS;
1053 } else if (xfs_physmem <= btoc(400*1024*1024)) {
1054 log->l_iclog_bufs = XLOG_MED_ICLOGS;
1055 } else {
1056 /* 256K with 32K bufs */
1057 log->l_iclog_bufs = XLOG_MAX_ICLOGS;
1058 }
1059 } else
1060 log->l_iclog_bufs = mp->m_logbufs;
1061
1062#if defined(DEBUG) || defined(XLOG_NOLOG)
1063 /* We are reactivating a filesystem after it was inactive */
1064 if (log->l_targ == xlog_target) {
1065 xlog_target = NULL;
1066 xlog_debug = 1;
1067 } 960 }
1068#endif 961 } else {
962 log->l_iclog_bufs = mp->m_logbufs;
1069 } 963 }
1070 964
1071 /* 965 /*
1072 * Buffer size passed in from mount system call. 966 * Buffer size passed in from mount system call.
1073 */ 967 */
1074 if (mp->m_logbsize != -1) { 968 if (mp->m_logbsize > 0) {
1075 size = log->l_iclog_size = mp->m_logbsize; 969 size = log->l_iclog_size = mp->m_logbsize;
1076 log->l_iclog_size_log = 0; 970 log->l_iclog_size_log = 0;
1077 while (size != 1) { 971 while (size != 1) {
@@ -1094,7 +988,7 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
1094 log->l_iclog_hsize = BBSIZE; 988 log->l_iclog_hsize = BBSIZE;
1095 log->l_iclog_heads = 1; 989 log->l_iclog_heads = 1;
1096 } 990 }
1097 return; 991 goto done;
1098 } 992 }
1099 993
1100 /* 994 /*
@@ -1121,7 +1015,7 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
1121 if (mp->m_sb.sb_blocksize >= 16*1024) { 1015 if (mp->m_sb.sb_blocksize >= 16*1024) {
1122 log->l_iclog_size = XLOG_BIG_RECORD_BSIZE; 1016 log->l_iclog_size = XLOG_BIG_RECORD_BSIZE;
1123 log->l_iclog_size_log = XLOG_BIG_RECORD_BSHIFT; 1017 log->l_iclog_size_log = XLOG_BIG_RECORD_BSHIFT;
1124 if (mp->m_logbufs == -1) { 1018 if (mp->m_logbufs <= 0) {
1125 switch (mp->m_sb.sb_blocksize) { 1019 switch (mp->m_sb.sb_blocksize) {
1126 case 16*1024: /* 16 KB */ 1020 case 16*1024: /* 16 KB */
1127 log->l_iclog_bufs = 3; 1021 log->l_iclog_bufs = 3;
@@ -1138,6 +1032,12 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
1138 } 1032 }
1139 } 1033 }
1140 } 1034 }
1035
1036done: /* are we being asked to make the sizes selected above visible? */
1037 if (mp->m_logbufs == 0)
1038 mp->m_logbufs = log->l_iclog_bufs;
1039 if (mp->m_logbsize == 0)
1040 mp->m_logbsize = log->l_iclog_size;
1141} /* xlog_get_iclog_buffer_size */ 1041} /* xlog_get_iclog_buffer_size */
1142 1042
1143 1043
@@ -3390,7 +3290,7 @@ xlog_ticket_get(xlog_t *log,
3390 * 3290 *
3391 ****************************************************************************** 3291 ******************************************************************************
3392 */ 3292 */
3393#if defined(DEBUG) && !defined(XLOG_NOLOG) 3293#if defined(DEBUG)
3394/* 3294/*
3395 * Make sure that the destination ptr is within the valid data region of 3295 * Make sure that the destination ptr is within the valid data region of
3396 * one of the iclogs. This uses backup pointers stored in a different 3296 * one of the iclogs. This uses backup pointers stored in a different
@@ -3554,7 +3454,7 @@ xlog_verify_iclog(xlog_t *log,
3554 ptr += sizeof(xlog_op_header_t) + op_len; 3454 ptr += sizeof(xlog_op_header_t) + op_len;
3555 } 3455 }
3556} /* xlog_verify_iclog */ 3456} /* xlog_verify_iclog */
3557#endif /* DEBUG && !XLOG_NOLOG */ 3457#endif
3558 3458
3559/* 3459/*
3560 * Mark all iclogs IOERROR. LOG_LOCK is held by the caller. 3460 * Mark all iclogs IOERROR. LOG_LOCK is held by the caller.
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index 758e4eb67c0c..8f285149681f 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -492,6 +492,8 @@ typedef struct log {
492 * alignment mask */ 492 * alignment mask */
493} xlog_t; 493} xlog_t;
494 494
495#define XLOG_FORCED_SHUTDOWN(log) ((log)->l_flags & XLOG_IO_ERROR)
496
495#define XLOG_GRANT_SUB_SPACE(log,bytes,type) \ 497#define XLOG_GRANT_SUB_SPACE(log,bytes,type) \
496 xlog_grant_sub_space(log,bytes,type) 498 xlog_grant_sub_space(log,bytes,type)
497static inline void xlog_grant_sub_space(struct log *log, int bytes, int type) 499static inline void xlog_grant_sub_space(struct log *log, int bytes, int type)
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index de3abf868ee3..279e043d7323 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -176,12 +176,8 @@ xfs_trans_dup(
176 XFS_LBC_INIT(&(ntp->t_busy)); 176 XFS_LBC_INIT(&(ntp->t_busy));
177 177
178 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); 178 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES);
179
180#if defined(XLOG_NOLOG) || defined(DEBUG)
181 ASSERT(!xlog_debug || tp->t_ticket != NULL);
182#else
183 ASSERT(tp->t_ticket != NULL); 179 ASSERT(tp->t_ticket != NULL);
184#endif 180
185 ntp->t_flags = XFS_TRANS_PERM_LOG_RES | (tp->t_flags & XFS_TRANS_RESERVE); 181 ntp->t_flags = XFS_TRANS_PERM_LOG_RES | (tp->t_flags & XFS_TRANS_RESERVE);
186 ntp->t_ticket = tp->t_ticket; 182 ntp->t_ticket = tp->t_ticket;
187 ntp->t_blk_res = tp->t_blk_res - tp->t_blk_res_used; 183 ntp->t_blk_res = tp->t_blk_res - tp->t_blk_res_used;
@@ -663,9 +659,6 @@ _xfs_trans_commit(
663 int sync; 659 int sync;
664#define XFS_TRANS_LOGVEC_COUNT 16 660#define XFS_TRANS_LOGVEC_COUNT 16
665 xfs_log_iovec_t log_vector_fast[XFS_TRANS_LOGVEC_COUNT]; 661 xfs_log_iovec_t log_vector_fast[XFS_TRANS_LOGVEC_COUNT];
666#if defined(XLOG_NOLOG) || defined(DEBUG)
667 static xfs_lsn_t trans_lsn = 1;
668#endif
669 void *commit_iclog; 662 void *commit_iclog;
670 int shutdown; 663 int shutdown;
671 664
@@ -716,11 +709,7 @@ shut_us_down:
716 *commit_lsn_p = commit_lsn; 709 *commit_lsn_p = commit_lsn;
717 return (shutdown); 710 return (shutdown);
718 } 711 }
719#if defined(XLOG_NOLOG) || defined(DEBUG)
720 ASSERT(!xlog_debug || tp->t_ticket != NULL);
721#else
722 ASSERT(tp->t_ticket != NULL); 712 ASSERT(tp->t_ticket != NULL);
723#endif
724 713
725 /* 714 /*
726 * If we need to update the superblock, then do it now. 715 * If we need to update the superblock, then do it now.
@@ -737,14 +726,10 @@ shut_us_down:
737 * by using a vector from the stack when it fits. 726 * by using a vector from the stack when it fits.
738 */ 727 */
739 nvec = xfs_trans_count_vecs(tp); 728 nvec = xfs_trans_count_vecs(tp);
740
741 if (nvec == 0) { 729 if (nvec == 0) {
742 xfs_force_shutdown(mp, XFS_LOG_IO_ERROR); 730 xfs_force_shutdown(mp, XFS_LOG_IO_ERROR);
743 goto shut_us_down; 731 goto shut_us_down;
744 } 732 } else if (nvec <= XFS_TRANS_LOGVEC_COUNT) {
745
746
747 if (nvec <= XFS_TRANS_LOGVEC_COUNT) {
748 log_vector = log_vector_fast; 733 log_vector = log_vector_fast;
749 } else { 734 } else {
750 log_vector = (xfs_log_iovec_t *)kmem_alloc(nvec * 735 log_vector = (xfs_log_iovec_t *)kmem_alloc(nvec *
@@ -758,30 +743,14 @@ shut_us_down:
758 */ 743 */
759 xfs_trans_fill_vecs(tp, log_vector); 744 xfs_trans_fill_vecs(tp, log_vector);
760 745
761 /* 746 error = xfs_log_write(mp, log_vector, nvec, tp->t_ticket, &(tp->t_lsn));
762 * Ignore errors here. xfs_log_done would do the right thing.
763 * We need to put the ticket, etc. away.
764 */
765 error = xfs_log_write(mp, log_vector, nvec, tp->t_ticket,
766 &(tp->t_lsn));
767 747
768#if defined(XLOG_NOLOG) || defined(DEBUG)
769 if (xlog_debug) {
770 commit_lsn = xfs_log_done(mp, tp->t_ticket,
771 &commit_iclog, log_flags);
772 } else {
773 commit_lsn = 0;
774 tp->t_lsn = trans_lsn++;
775 }
776#else
777 /* 748 /*
778 * This is the regular case. At this point (after the call finishes), 749 * The transaction is committed incore here, and can go out to disk
779 * the transaction is committed incore and could go out to disk at 750 * at any time after this call. However, all the items associated
780 * any time. However, all the items associated with the transaction 751 * with the transaction are still locked and pinned in memory.
781 * are still locked and pinned in memory.
782 */ 752 */
783 commit_lsn = xfs_log_done(mp, tp->t_ticket, &commit_iclog, log_flags); 753 commit_lsn = xfs_log_done(mp, tp->t_ticket, &commit_iclog, log_flags);
784#endif
785 754
786 tp->t_commit_lsn = commit_lsn; 755 tp->t_commit_lsn = commit_lsn;
787 if (nvec > XFS_TRANS_LOGVEC_COUNT) { 756 if (nvec > XFS_TRANS_LOGVEC_COUNT) {
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index dd419e1d71ba..94f0858699b5 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -214,9 +214,7 @@ xfs_start_flags(
214 } 214 }
215 215
216 if (ap->logbufs != -1 && 216 if (ap->logbufs != -1 &&
217#if defined(DEBUG) || defined(XLOG_NOLOG)
218 ap->logbufs != 0 && 217 ap->logbufs != 0 &&
219#endif
220 (ap->logbufs < XLOG_MIN_ICLOGS || 218 (ap->logbufs < XLOG_MIN_ICLOGS ||
221 ap->logbufs > XLOG_MAX_ICLOGS)) { 219 ap->logbufs > XLOG_MAX_ICLOGS)) {
222 cmn_err(CE_WARN, 220 cmn_err(CE_WARN,
@@ -226,6 +224,7 @@ xfs_start_flags(
226 } 224 }
227 mp->m_logbufs = ap->logbufs; 225 mp->m_logbufs = ap->logbufs;
228 if (ap->logbufsize != -1 && 226 if (ap->logbufsize != -1 &&
227 ap->logbufsize != 0 &&
229 ap->logbufsize != 16 * 1024 && 228 ap->logbufsize != 16 * 1024 &&
230 ap->logbufsize != 32 * 1024 && 229 ap->logbufsize != 32 * 1024 &&
231 ap->logbufsize != 64 * 1024 && 230 ap->logbufsize != 64 * 1024 &&
@@ -1910,13 +1909,14 @@ xfs_showargs(
1910 seq_printf(m, "," MNTOPT_IHASHSIZE "=%d", mp->m_ihsize); 1909 seq_printf(m, "," MNTOPT_IHASHSIZE "=%d", mp->m_ihsize);
1911 1910
1912 if (mp->m_flags & XFS_MOUNT_DFLT_IOSIZE) 1911 if (mp->m_flags & XFS_MOUNT_DFLT_IOSIZE)
1913 seq_printf(m, "," MNTOPT_ALLOCSIZE "=%d", 1<<mp->m_writeio_log); 1912 seq_printf(m, "," MNTOPT_ALLOCSIZE "=%dk",
1913 (int)(1 << mp->m_writeio_log) >> 10);
1914 1914
1915 if (mp->m_logbufs > 0) 1915 if (mp->m_logbufs > 0)
1916 seq_printf(m, "," MNTOPT_LOGBUFS "=%d", mp->m_logbufs); 1916 seq_printf(m, "," MNTOPT_LOGBUFS "=%d", mp->m_logbufs);
1917 1917
1918 if (mp->m_logbsize > 0) 1918 if (mp->m_logbsize > 0)
1919 seq_printf(m, "," MNTOPT_LOGBSIZE "=%d", mp->m_logbsize); 1919 seq_printf(m, "," MNTOPT_LOGBSIZE "=%dk", mp->m_logbsize >> 10);
1920 1920
1921 if (mp->m_logname) 1921 if (mp->m_logname)
1922 seq_printf(m, "," MNTOPT_LOGDEV "=%s", mp->m_logname); 1922 seq_printf(m, "," MNTOPT_LOGDEV "=%s", mp->m_logname);