diff options
-rw-r--r-- | fs/xfs/linux-2.6/kmem.c | 9 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 6 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 17 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 127 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.c | 5 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sysctl.c | 2 |
6 files changed, 76 insertions, 90 deletions
diff --git a/fs/xfs/linux-2.6/kmem.c b/fs/xfs/linux-2.6/kmem.c index 666c9db48eb6..a907de565db3 100644 --- a/fs/xfs/linux-2.6/kmem.c +++ b/fs/xfs/linux-2.6/kmem.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/backing-dev.h> | 23 | #include <linux/backing-dev.h> |
24 | #include "time.h" | 24 | #include "time.h" |
25 | #include "kmem.h" | 25 | #include "kmem.h" |
26 | #include "xfs_message.h" | ||
26 | 27 | ||
27 | /* | 28 | /* |
28 | * Greedy allocation. May fail and may return vmalloced memory. | 29 | * Greedy allocation. May fail and may return vmalloced memory. |
@@ -56,8 +57,8 @@ kmem_alloc(size_t size, unsigned int __nocast flags) | |||
56 | if (ptr || (flags & (KM_MAYFAIL|KM_NOSLEEP))) | 57 | if (ptr || (flags & (KM_MAYFAIL|KM_NOSLEEP))) |
57 | return ptr; | 58 | return ptr; |
58 | if (!(++retries % 100)) | 59 | if (!(++retries % 100)) |
59 | printk(KERN_ERR "XFS: possible memory allocation " | 60 | xfs_err(NULL, |
60 | "deadlock in %s (mode:0x%x)\n", | 61 | "possible memory allocation deadlock in %s (mode:0x%x)", |
61 | __func__, lflags); | 62 | __func__, lflags); |
62 | congestion_wait(BLK_RW_ASYNC, HZ/50); | 63 | congestion_wait(BLK_RW_ASYNC, HZ/50); |
63 | } while (1); | 64 | } while (1); |
@@ -112,8 +113,8 @@ kmem_zone_alloc(kmem_zone_t *zone, unsigned int __nocast flags) | |||
112 | if (ptr || (flags & (KM_MAYFAIL|KM_NOSLEEP))) | 113 | if (ptr || (flags & (KM_MAYFAIL|KM_NOSLEEP))) |
113 | return ptr; | 114 | return ptr; |
114 | if (!(++retries % 100)) | 115 | if (!(++retries % 100)) |
115 | printk(KERN_ERR "XFS: possible memory allocation " | 116 | xfs_err(NULL, |
116 | "deadlock in %s (mode:0x%x)\n", | 117 | "possible memory allocation deadlock in %s (mode:0x%x)", |
117 | __func__, lflags); | 118 | __func__, lflags); |
118 | congestion_wait(BLK_RW_ASYNC, HZ/50); | 119 | congestion_wait(BLK_RW_ASYNC, HZ/50); |
119 | } while (1); | 120 | } while (1); |
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index ec7bbb5645b6..8c5c87277456 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -854,7 +854,7 @@ xfs_aops_discard_page( | |||
854 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) | 854 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) |
855 | goto out_invalidate; | 855 | goto out_invalidate; |
856 | 856 | ||
857 | xfs_fs_cmn_err(CE_ALERT, ip->i_mount, | 857 | xfs_alert(ip->i_mount, |
858 | "page discard on page %p, inode 0x%llx, offset %llu.", | 858 | "page discard on page %p, inode 0x%llx, offset %llu.", |
859 | page, ip->i_ino, offset); | 859 | page, ip->i_ino, offset); |
860 | 860 | ||
@@ -872,7 +872,7 @@ xfs_aops_discard_page( | |||
872 | if (error) { | 872 | if (error) { |
873 | /* something screwed, just bail */ | 873 | /* something screwed, just bail */ |
874 | if (!XFS_FORCED_SHUTDOWN(ip->i_mount)) { | 874 | if (!XFS_FORCED_SHUTDOWN(ip->i_mount)) { |
875 | xfs_fs_cmn_err(CE_ALERT, ip->i_mount, | 875 | xfs_alert(ip->i_mount, |
876 | "page discard unable to remove delalloc mapping."); | 876 | "page discard unable to remove delalloc mapping."); |
877 | } | 877 | } |
878 | break; | 878 | break; |
@@ -1411,7 +1411,7 @@ xfs_vm_write_failed( | |||
1411 | if (error) { | 1411 | if (error) { |
1412 | /* something screwed, just bail */ | 1412 | /* something screwed, just bail */ |
1413 | if (!XFS_FORCED_SHUTDOWN(ip->i_mount)) { | 1413 | if (!XFS_FORCED_SHUTDOWN(ip->i_mount)) { |
1414 | xfs_fs_cmn_err(CE_ALERT, ip->i_mount, | 1414 | xfs_alert(ip->i_mount, |
1415 | "xfs_vm_write_failed: unable to clean up ino %lld", | 1415 | "xfs_vm_write_failed: unable to clean up ino %lld", |
1416 | ip->i_ino); | 1416 | ip->i_ino); |
1417 | } | 1417 | } |
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index ac1c7e8378dd..3cc671c8a67f 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -401,9 +401,8 @@ _xfs_buf_lookup_pages( | |||
401 | * handle buffer allocation failures we can't do much. | 401 | * handle buffer allocation failures we can't do much. |
402 | */ | 402 | */ |
403 | if (!(++retries % 100)) | 403 | if (!(++retries % 100)) |
404 | printk(KERN_ERR | 404 | xfs_err(NULL, |
405 | "XFS: possible memory allocation " | 405 | "possible memory allocation deadlock in %s (mode:0x%x)", |
406 | "deadlock in %s (mode:0x%x)\n", | ||
407 | __func__, gfp_mask); | 406 | __func__, gfp_mask); |
408 | 407 | ||
409 | XFS_STATS_INC(xb_page_retries); | 408 | XFS_STATS_INC(xb_page_retries); |
@@ -615,8 +614,8 @@ xfs_buf_get( | |||
615 | if (!(bp->b_flags & XBF_MAPPED)) { | 614 | if (!(bp->b_flags & XBF_MAPPED)) { |
616 | error = _xfs_buf_map_pages(bp, flags); | 615 | error = _xfs_buf_map_pages(bp, flags); |
617 | if (unlikely(error)) { | 616 | if (unlikely(error)) { |
618 | printk(KERN_WARNING "%s: failed to map pages\n", | 617 | xfs_warn(target->bt_mount, |
619 | __func__); | 618 | "%s: failed to map pages\n", __func__); |
620 | goto no_buffer; | 619 | goto no_buffer; |
621 | } | 620 | } |
622 | } | 621 | } |
@@ -850,8 +849,8 @@ xfs_buf_get_uncached( | |||
850 | 849 | ||
851 | error = _xfs_buf_map_pages(bp, XBF_MAPPED); | 850 | error = _xfs_buf_map_pages(bp, XBF_MAPPED); |
852 | if (unlikely(error)) { | 851 | if (unlikely(error)) { |
853 | printk(KERN_WARNING "%s: failed to map pages\n", | 852 | xfs_warn(target->bt_mount, |
854 | __func__); | 853 | "%s: failed to map pages\n", __func__); |
855 | goto fail_free_mem; | 854 | goto fail_free_mem; |
856 | } | 855 | } |
857 | 856 | ||
@@ -1617,8 +1616,8 @@ xfs_setsize_buftarg_flags( | |||
1617 | btp->bt_smask = sectorsize - 1; | 1616 | btp->bt_smask = sectorsize - 1; |
1618 | 1617 | ||
1619 | if (set_blocksize(btp->bt_bdev, sectorsize)) { | 1618 | if (set_blocksize(btp->bt_bdev, sectorsize)) { |
1620 | printk(KERN_WARNING | 1619 | xfs_warn(btp->bt_mount, |
1621 | "XFS: Cannot set_blocksize to %u on device %s\n", | 1620 | "Cannot set_blocksize to %u on device %s\n", |
1622 | sectorsize, XFS_BUFTARG_NAME(btp)); | 1621 | sectorsize, XFS_BUFTARG_NAME(btp)); |
1623 | return EINVAL; | 1622 | return EINVAL; |
1624 | } | 1623 | } |
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 7ec1fb8c1316..818c4cf2de86 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -173,6 +173,15 @@ xfs_parseargs( | |||
173 | __uint8_t iosizelog = 0; | 173 | __uint8_t iosizelog = 0; |
174 | 174 | ||
175 | /* | 175 | /* |
176 | * set up the mount name first so all the errors will refer to the | ||
177 | * correct device. | ||
178 | */ | ||
179 | mp->m_fsname = kstrndup(sb->s_id, MAXNAMELEN, GFP_KERNEL); | ||
180 | if (!mp->m_fsname) | ||
181 | return ENOMEM; | ||
182 | mp->m_fsname_len = strlen(mp->m_fsname) + 1; | ||
183 | |||
184 | /* | ||
176 | * Copy binary VFS mount flags we are interested in. | 185 | * Copy binary VFS mount flags we are interested in. |
177 | */ | 186 | */ |
178 | if (sb->s_flags & MS_RDONLY) | 187 | if (sb->s_flags & MS_RDONLY) |
@@ -208,24 +217,21 @@ xfs_parseargs( | |||
208 | 217 | ||
209 | if (!strcmp(this_char, MNTOPT_LOGBUFS)) { | 218 | if (!strcmp(this_char, MNTOPT_LOGBUFS)) { |
210 | if (!value || !*value) { | 219 | if (!value || !*value) { |
211 | cmn_err(CE_WARN, | 220 | xfs_warn(mp, "%s option requires an argument", |
212 | "XFS: %s option requires an argument", | ||
213 | this_char); | 221 | this_char); |
214 | return EINVAL; | 222 | return EINVAL; |
215 | } | 223 | } |
216 | mp->m_logbufs = simple_strtoul(value, &eov, 10); | 224 | mp->m_logbufs = simple_strtoul(value, &eov, 10); |
217 | } else if (!strcmp(this_char, MNTOPT_LOGBSIZE)) { | 225 | } else if (!strcmp(this_char, MNTOPT_LOGBSIZE)) { |
218 | if (!value || !*value) { | 226 | if (!value || !*value) { |
219 | cmn_err(CE_WARN, | 227 | xfs_warn(mp, "%s option requires an argument", |
220 | "XFS: %s option requires an argument", | ||
221 | this_char); | 228 | this_char); |
222 | return EINVAL; | 229 | return EINVAL; |
223 | } | 230 | } |
224 | mp->m_logbsize = suffix_strtoul(value, &eov, 10); | 231 | mp->m_logbsize = suffix_strtoul(value, &eov, 10); |
225 | } else if (!strcmp(this_char, MNTOPT_LOGDEV)) { | 232 | } else if (!strcmp(this_char, MNTOPT_LOGDEV)) { |
226 | if (!value || !*value) { | 233 | if (!value || !*value) { |
227 | cmn_err(CE_WARN, | 234 | xfs_warn(mp, "%s option requires an argument", |
228 | "XFS: %s option requires an argument", | ||
229 | this_char); | 235 | this_char); |
230 | return EINVAL; | 236 | return EINVAL; |
231 | } | 237 | } |
@@ -233,14 +239,12 @@ xfs_parseargs( | |||
233 | if (!mp->m_logname) | 239 | if (!mp->m_logname) |
234 | return ENOMEM; | 240 | return ENOMEM; |
235 | } else if (!strcmp(this_char, MNTOPT_MTPT)) { | 241 | } else if (!strcmp(this_char, MNTOPT_MTPT)) { |
236 | cmn_err(CE_WARN, | 242 | xfs_warn(mp, "%s option not allowed on this system", |
237 | "XFS: %s option not allowed on this system", | ||
238 | this_char); | 243 | this_char); |
239 | return EINVAL; | 244 | return EINVAL; |
240 | } else if (!strcmp(this_char, MNTOPT_RTDEV)) { | 245 | } else if (!strcmp(this_char, MNTOPT_RTDEV)) { |
241 | if (!value || !*value) { | 246 | if (!value || !*value) { |
242 | cmn_err(CE_WARN, | 247 | xfs_warn(mp, "%s option requires an argument", |
243 | "XFS: %s option requires an argument", | ||
244 | this_char); | 248 | this_char); |
245 | return EINVAL; | 249 | return EINVAL; |
246 | } | 250 | } |
@@ -249,8 +253,7 @@ xfs_parseargs( | |||
249 | return ENOMEM; | 253 | return ENOMEM; |
250 | } else if (!strcmp(this_char, MNTOPT_BIOSIZE)) { | 254 | } else if (!strcmp(this_char, MNTOPT_BIOSIZE)) { |
251 | if (!value || !*value) { | 255 | if (!value || !*value) { |
252 | cmn_err(CE_WARN, | 256 | xfs_warn(mp, "%s option requires an argument", |
253 | "XFS: %s option requires an argument", | ||
254 | this_char); | 257 | this_char); |
255 | return EINVAL; | 258 | return EINVAL; |
256 | } | 259 | } |
@@ -258,8 +261,7 @@ xfs_parseargs( | |||
258 | iosizelog = ffs(iosize) - 1; | 261 | iosizelog = ffs(iosize) - 1; |
259 | } else if (!strcmp(this_char, MNTOPT_ALLOCSIZE)) { | 262 | } else if (!strcmp(this_char, MNTOPT_ALLOCSIZE)) { |
260 | if (!value || !*value) { | 263 | if (!value || !*value) { |
261 | cmn_err(CE_WARN, | 264 | xfs_warn(mp, "%s option requires an argument", |
262 | "XFS: %s option requires an argument", | ||
263 | this_char); | 265 | this_char); |
264 | return EINVAL; | 266 | return EINVAL; |
265 | } | 267 | } |
@@ -281,16 +283,14 @@ xfs_parseargs( | |||
281 | mp->m_flags |= XFS_MOUNT_SWALLOC; | 283 | mp->m_flags |= XFS_MOUNT_SWALLOC; |
282 | } else if (!strcmp(this_char, MNTOPT_SUNIT)) { | 284 | } else if (!strcmp(this_char, MNTOPT_SUNIT)) { |
283 | if (!value || !*value) { | 285 | if (!value || !*value) { |
284 | cmn_err(CE_WARN, | 286 | xfs_warn(mp, "%s option requires an argument", |
285 | "XFS: %s option requires an argument", | ||
286 | this_char); | 287 | this_char); |
287 | return EINVAL; | 288 | return EINVAL; |
288 | } | 289 | } |
289 | dsunit = simple_strtoul(value, &eov, 10); | 290 | dsunit = simple_strtoul(value, &eov, 10); |
290 | } else if (!strcmp(this_char, MNTOPT_SWIDTH)) { | 291 | } else if (!strcmp(this_char, MNTOPT_SWIDTH)) { |
291 | if (!value || !*value) { | 292 | if (!value || !*value) { |
292 | cmn_err(CE_WARN, | 293 | xfs_warn(mp, "%s option requires an argument", |
293 | "XFS: %s option requires an argument", | ||
294 | this_char); | 294 | this_char); |
295 | return EINVAL; | 295 | return EINVAL; |
296 | } | 296 | } |
@@ -298,8 +298,7 @@ xfs_parseargs( | |||
298 | } else if (!strcmp(this_char, MNTOPT_64BITINODE)) { | 298 | } else if (!strcmp(this_char, MNTOPT_64BITINODE)) { |
299 | mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS; | 299 | mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS; |
300 | #if !XFS_BIG_INUMS | 300 | #if !XFS_BIG_INUMS |
301 | cmn_err(CE_WARN, | 301 | xfs_warn(mp, "%s option not allowed on this system", |
302 | "XFS: %s option not allowed on this system", | ||
303 | this_char); | 302 | this_char); |
304 | return EINVAL; | 303 | return EINVAL; |
305 | #endif | 304 | #endif |
@@ -357,20 +356,19 @@ xfs_parseargs( | |||
357 | } else if (!strcmp(this_char, MNTOPT_NODELAYLOG)) { | 356 | } else if (!strcmp(this_char, MNTOPT_NODELAYLOG)) { |
358 | mp->m_flags &= ~XFS_MOUNT_DELAYLOG; | 357 | mp->m_flags &= ~XFS_MOUNT_DELAYLOG; |
359 | } else if (!strcmp(this_char, "ihashsize")) { | 358 | } else if (!strcmp(this_char, "ihashsize")) { |
360 | cmn_err(CE_WARN, | 359 | xfs_warn(mp, |
361 | "XFS: ihashsize no longer used, option is deprecated."); | 360 | "ihashsize no longer used, option is deprecated."); |
362 | } else if (!strcmp(this_char, "osyncisdsync")) { | 361 | } else if (!strcmp(this_char, "osyncisdsync")) { |
363 | cmn_err(CE_WARN, | 362 | xfs_warn(mp, |
364 | "XFS: osyncisdsync has no effect, option is deprecated."); | 363 | "osyncisdsync has no effect, option is deprecated."); |
365 | } else if (!strcmp(this_char, "osyncisosync")) { | 364 | } else if (!strcmp(this_char, "osyncisosync")) { |
366 | cmn_err(CE_WARN, | 365 | xfs_warn(mp, |
367 | "XFS: osyncisosync has no effect, option is deprecated."); | 366 | "osyncisosync has no effect, option is deprecated."); |
368 | } else if (!strcmp(this_char, "irixsgid")) { | 367 | } else if (!strcmp(this_char, "irixsgid")) { |
369 | cmn_err(CE_WARN, | 368 | xfs_warn(mp, |
370 | "XFS: irixsgid is now a sysctl(2) variable, option is deprecated."); | 369 | "irixsgid is now a sysctl(2) variable, option is deprecated."); |
371 | } else { | 370 | } else { |
372 | cmn_err(CE_WARN, | 371 | xfs_warn(mp, "unknown mount option [%s].", this_char); |
373 | "XFS: unknown mount option [%s].", this_char); | ||
374 | return EINVAL; | 372 | return EINVAL; |
375 | } | 373 | } |
376 | } | 374 | } |
@@ -380,40 +378,37 @@ xfs_parseargs( | |||
380 | */ | 378 | */ |
381 | if ((mp->m_flags & XFS_MOUNT_NORECOVERY) && | 379 | if ((mp->m_flags & XFS_MOUNT_NORECOVERY) && |
382 | !(mp->m_flags & XFS_MOUNT_RDONLY)) { | 380 | !(mp->m_flags & XFS_MOUNT_RDONLY)) { |
383 | cmn_err(CE_WARN, "XFS: no-recovery mounts must be read-only."); | 381 | xfs_warn(mp, "no-recovery mounts must be read-only."); |
384 | return EINVAL; | 382 | return EINVAL; |
385 | } | 383 | } |
386 | 384 | ||
387 | if ((mp->m_flags & XFS_MOUNT_NOALIGN) && (dsunit || dswidth)) { | 385 | if ((mp->m_flags & XFS_MOUNT_NOALIGN) && (dsunit || dswidth)) { |
388 | cmn_err(CE_WARN, | 386 | xfs_warn(mp, |
389 | "XFS: sunit and swidth options incompatible with the noalign option"); | 387 | "sunit and swidth options incompatible with the noalign option"); |
390 | return EINVAL; | 388 | return EINVAL; |
391 | } | 389 | } |
392 | 390 | ||
393 | #ifndef CONFIG_XFS_QUOTA | 391 | #ifndef CONFIG_XFS_QUOTA |
394 | if (XFS_IS_QUOTA_RUNNING(mp)) { | 392 | if (XFS_IS_QUOTA_RUNNING(mp)) { |
395 | cmn_err(CE_WARN, | 393 | xfs_warn(mp, "quota support not available in this kernel."); |
396 | "XFS: quota support not available in this kernel."); | ||
397 | return EINVAL; | 394 | return EINVAL; |
398 | } | 395 | } |
399 | #endif | 396 | #endif |
400 | 397 | ||
401 | if ((mp->m_qflags & (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE)) && | 398 | if ((mp->m_qflags & (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE)) && |
402 | (mp->m_qflags & (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE))) { | 399 | (mp->m_qflags & (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE))) { |
403 | cmn_err(CE_WARN, | 400 | xfs_warn(mp, "cannot mount with both project and group quota"); |
404 | "XFS: cannot mount with both project and group quota"); | ||
405 | return EINVAL; | 401 | return EINVAL; |
406 | } | 402 | } |
407 | 403 | ||
408 | if ((dsunit && !dswidth) || (!dsunit && dswidth)) { | 404 | if ((dsunit && !dswidth) || (!dsunit && dswidth)) { |
409 | cmn_err(CE_WARN, | 405 | xfs_warn(mp, "sunit and swidth must be specified together"); |
410 | "XFS: sunit and swidth must be specified together"); | ||
411 | return EINVAL; | 406 | return EINVAL; |
412 | } | 407 | } |
413 | 408 | ||
414 | if (dsunit && (dswidth % dsunit != 0)) { | 409 | if (dsunit && (dswidth % dsunit != 0)) { |
415 | cmn_err(CE_WARN, | 410 | xfs_warn(mp, |
416 | "XFS: stripe width (%d) must be a multiple of the stripe unit (%d)", | 411 | "stripe width (%d) must be a multiple of the stripe unit (%d)", |
417 | dswidth, dsunit); | 412 | dswidth, dsunit); |
418 | return EINVAL; | 413 | return EINVAL; |
419 | } | 414 | } |
@@ -439,8 +434,7 @@ done: | |||
439 | mp->m_logbufs != 0 && | 434 | mp->m_logbufs != 0 && |
440 | (mp->m_logbufs < XLOG_MIN_ICLOGS || | 435 | (mp->m_logbufs < XLOG_MIN_ICLOGS || |
441 | mp->m_logbufs > XLOG_MAX_ICLOGS)) { | 436 | mp->m_logbufs > XLOG_MAX_ICLOGS)) { |
442 | cmn_err(CE_WARN, | 437 | xfs_warn(mp, "invalid logbufs value: %d [not %d-%d]", |
443 | "XFS: invalid logbufs value: %d [not %d-%d]", | ||
444 | mp->m_logbufs, XLOG_MIN_ICLOGS, XLOG_MAX_ICLOGS); | 438 | mp->m_logbufs, XLOG_MIN_ICLOGS, XLOG_MAX_ICLOGS); |
445 | return XFS_ERROR(EINVAL); | 439 | return XFS_ERROR(EINVAL); |
446 | } | 440 | } |
@@ -449,22 +443,16 @@ done: | |||
449 | (mp->m_logbsize < XLOG_MIN_RECORD_BSIZE || | 443 | (mp->m_logbsize < XLOG_MIN_RECORD_BSIZE || |
450 | mp->m_logbsize > XLOG_MAX_RECORD_BSIZE || | 444 | mp->m_logbsize > XLOG_MAX_RECORD_BSIZE || |
451 | !is_power_of_2(mp->m_logbsize))) { | 445 | !is_power_of_2(mp->m_logbsize))) { |
452 | cmn_err(CE_WARN, | 446 | xfs_warn(mp, |
453 | "XFS: invalid logbufsize: %d [not 16k,32k,64k,128k or 256k]", | 447 | "invalid logbufsize: %d [not 16k,32k,64k,128k or 256k]", |
454 | mp->m_logbsize); | 448 | mp->m_logbsize); |
455 | return XFS_ERROR(EINVAL); | 449 | return XFS_ERROR(EINVAL); |
456 | } | 450 | } |
457 | 451 | ||
458 | mp->m_fsname = kstrndup(sb->s_id, MAXNAMELEN, GFP_KERNEL); | ||
459 | if (!mp->m_fsname) | ||
460 | return ENOMEM; | ||
461 | mp->m_fsname_len = strlen(mp->m_fsname) + 1; | ||
462 | |||
463 | if (iosizelog) { | 452 | if (iosizelog) { |
464 | if (iosizelog > XFS_MAX_IO_LOG || | 453 | if (iosizelog > XFS_MAX_IO_LOG || |
465 | iosizelog < XFS_MIN_IO_LOG) { | 454 | iosizelog < XFS_MIN_IO_LOG) { |
466 | cmn_err(CE_WARN, | 455 | xfs_warn(mp, "invalid log iosize: %d [not %d-%d]", |
467 | "XFS: invalid log iosize: %d [not %d-%d]", | ||
468 | iosizelog, XFS_MIN_IO_LOG, | 456 | iosizelog, XFS_MIN_IO_LOG, |
469 | XFS_MAX_IO_LOG); | 457 | XFS_MAX_IO_LOG); |
470 | return XFS_ERROR(EINVAL); | 458 | return XFS_ERROR(EINVAL); |
@@ -611,7 +599,7 @@ xfs_blkdev_get( | |||
611 | mp); | 599 | mp); |
612 | if (IS_ERR(*bdevp)) { | 600 | if (IS_ERR(*bdevp)) { |
613 | error = PTR_ERR(*bdevp); | 601 | error = PTR_ERR(*bdevp); |
614 | printk("XFS: Invalid device [%s], error=%d\n", name, error); | 602 | xfs_warn(mp, "Invalid device [%s], error=%d\n", name, error); |
615 | } | 603 | } |
616 | 604 | ||
617 | return -error; | 605 | return -error; |
@@ -665,23 +653,23 @@ xfs_mountfs_check_barriers(xfs_mount_t *mp) | |||
665 | int error; | 653 | int error; |
666 | 654 | ||
667 | if (mp->m_logdev_targp != mp->m_ddev_targp) { | 655 | if (mp->m_logdev_targp != mp->m_ddev_targp) { |
668 | xfs_fs_cmn_err(CE_NOTE, mp, | 656 | xfs_notice(mp, |
669 | "Disabling barriers, not supported with external log device"); | 657 | "Disabling barriers, not supported with external log device"); |
670 | mp->m_flags &= ~XFS_MOUNT_BARRIER; | 658 | mp->m_flags &= ~XFS_MOUNT_BARRIER; |
671 | return; | 659 | return; |
672 | } | 660 | } |
673 | 661 | ||
674 | if (xfs_readonly_buftarg(mp->m_ddev_targp)) { | 662 | if (xfs_readonly_buftarg(mp->m_ddev_targp)) { |
675 | xfs_fs_cmn_err(CE_NOTE, mp, | 663 | xfs_notice(mp, |
676 | "Disabling barriers, underlying device is readonly"); | 664 | "Disabling barriers, underlying device is readonly"); |
677 | mp->m_flags &= ~XFS_MOUNT_BARRIER; | 665 | mp->m_flags &= ~XFS_MOUNT_BARRIER; |
678 | return; | 666 | return; |
679 | } | 667 | } |
680 | 668 | ||
681 | error = xfs_barrier_test(mp); | 669 | error = xfs_barrier_test(mp); |
682 | if (error) { | 670 | if (error) { |
683 | xfs_fs_cmn_err(CE_NOTE, mp, | 671 | xfs_notice(mp, |
684 | "Disabling barriers, trial barrier write failed"); | 672 | "Disabling barriers, trial barrier write failed"); |
685 | mp->m_flags &= ~XFS_MOUNT_BARRIER; | 673 | mp->m_flags &= ~XFS_MOUNT_BARRIER; |
686 | return; | 674 | return; |
687 | } | 675 | } |
@@ -744,8 +732,8 @@ xfs_open_devices( | |||
744 | goto out_close_logdev; | 732 | goto out_close_logdev; |
745 | 733 | ||
746 | if (rtdev == ddev || rtdev == logdev) { | 734 | if (rtdev == ddev || rtdev == logdev) { |
747 | cmn_err(CE_WARN, | 735 | xfs_warn(mp, |
748 | "XFS: Cannot mount filesystem with identical rtdev and ddev/logdev."); | 736 | "Cannot mount filesystem with identical rtdev and ddev/logdev."); |
749 | error = EINVAL; | 737 | error = EINVAL; |
750 | goto out_close_rtdev; | 738 | goto out_close_rtdev; |
751 | } | 739 | } |
@@ -1346,8 +1334,8 @@ xfs_fs_remount( | |||
1346 | * options that we can't actually change. | 1334 | * options that we can't actually change. |
1347 | */ | 1335 | */ |
1348 | #if 0 | 1336 | #if 0 |
1349 | printk(KERN_INFO | 1337 | xfs_info(mp, |
1350 | "XFS: mount option \"%s\" not supported for remount\n", p); | 1338 | "mount option \"%s\" not supported for remount\n", p); |
1351 | return -EINVAL; | 1339 | return -EINVAL; |
1352 | #else | 1340 | #else |
1353 | break; | 1341 | break; |
@@ -1368,8 +1356,7 @@ xfs_fs_remount( | |||
1368 | if (mp->m_update_flags) { | 1356 | if (mp->m_update_flags) { |
1369 | error = xfs_mount_log_sb(mp, mp->m_update_flags); | 1357 | error = xfs_mount_log_sb(mp, mp->m_update_flags); |
1370 | if (error) { | 1358 | if (error) { |
1371 | cmn_err(CE_WARN, | 1359 | xfs_warn(mp, "failed to write sb changes"); |
1372 | "XFS: failed to write sb changes"); | ||
1373 | return error; | 1360 | return error; |
1374 | } | 1361 | } |
1375 | mp->m_update_flags = 0; | 1362 | mp->m_update_flags = 0; |
@@ -1453,15 +1440,15 @@ xfs_finish_flags( | |||
1453 | mp->m_logbsize = mp->m_sb.sb_logsunit; | 1440 | mp->m_logbsize = mp->m_sb.sb_logsunit; |
1454 | } else if (mp->m_logbsize > 0 && | 1441 | } else if (mp->m_logbsize > 0 && |
1455 | mp->m_logbsize < mp->m_sb.sb_logsunit) { | 1442 | mp->m_logbsize < mp->m_sb.sb_logsunit) { |
1456 | cmn_err(CE_WARN, | 1443 | xfs_warn(mp, |
1457 | "XFS: logbuf size must be greater than or equal to log stripe size"); | 1444 | "logbuf size must be greater than or equal to log stripe size"); |
1458 | return XFS_ERROR(EINVAL); | 1445 | return XFS_ERROR(EINVAL); |
1459 | } | 1446 | } |
1460 | } else { | 1447 | } else { |
1461 | /* Fail a mount if the logbuf is larger than 32K */ | 1448 | /* Fail a mount if the logbuf is larger than 32K */ |
1462 | if (mp->m_logbsize > XLOG_BIG_RECORD_BSIZE) { | 1449 | if (mp->m_logbsize > XLOG_BIG_RECORD_BSIZE) { |
1463 | cmn_err(CE_WARN, | 1450 | xfs_warn(mp, |
1464 | "XFS: logbuf size for version 1 logs must be 16K or 32K"); | 1451 | "logbuf size for version 1 logs must be 16K or 32K"); |
1465 | return XFS_ERROR(EINVAL); | 1452 | return XFS_ERROR(EINVAL); |
1466 | } | 1453 | } |
1467 | } | 1454 | } |
@@ -1478,8 +1465,8 @@ xfs_finish_flags( | |||
1478 | * prohibit r/w mounts of read-only filesystems | 1465 | * prohibit r/w mounts of read-only filesystems |
1479 | */ | 1466 | */ |
1480 | if ((mp->m_sb.sb_flags & XFS_SBF_READONLY) && !ronly) { | 1467 | if ((mp->m_sb.sb_flags & XFS_SBF_READONLY) && !ronly) { |
1481 | cmn_err(CE_WARN, | 1468 | xfs_warn(mp, |
1482 | "XFS: cannot mount a read-only filesystem as read-write"); | 1469 | "cannot mount a read-only filesystem as read-write"); |
1483 | return XFS_ERROR(EROFS); | 1470 | return XFS_ERROR(EROFS); |
1484 | } | 1471 | } |
1485 | 1472 | ||
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index e22f0057d21f..6c10f1d2e3d3 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c | |||
@@ -425,8 +425,7 @@ xfs_quiesce_attr( | |||
425 | /* Push the superblock and write an unmount record */ | 425 | /* Push the superblock and write an unmount record */ |
426 | error = xfs_log_sbcount(mp, 1); | 426 | error = xfs_log_sbcount(mp, 1); |
427 | if (error) | 427 | if (error) |
428 | xfs_fs_cmn_err(CE_WARN, mp, | 428 | xfs_warn(mp, "xfs_attr_quiesce: failed to log sb changes. " |
429 | "xfs_attr_quiesce: failed to log sb changes. " | ||
430 | "Frozen image may not be consistent."); | 429 | "Frozen image may not be consistent."); |
431 | xfs_log_unmount_write(mp); | 430 | xfs_log_unmount_write(mp); |
432 | xfs_unmountfs_writesb(mp); | 431 | xfs_unmountfs_writesb(mp); |
@@ -806,7 +805,7 @@ xfs_reclaim_inode( | |||
806 | * pass on the error. | 805 | * pass on the error. |
807 | */ | 806 | */ |
808 | if (error && error != EAGAIN && !XFS_FORCED_SHUTDOWN(ip->i_mount)) { | 807 | if (error && error != EAGAIN && !XFS_FORCED_SHUTDOWN(ip->i_mount)) { |
809 | xfs_fs_cmn_err(CE_WARN, ip->i_mount, | 808 | xfs_warn(ip->i_mount, |
810 | "inode 0x%llx background reclaim flush failed with %d", | 809 | "inode 0x%llx background reclaim flush failed with %d", |
811 | (long long)ip->i_ino, error); | 810 | (long long)ip->i_ino, error); |
812 | } | 811 | } |
diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c index ee3cee097e7e..ee2d2adaa438 100644 --- a/fs/xfs/linux-2.6/xfs_sysctl.c +++ b/fs/xfs/linux-2.6/xfs_sysctl.c | |||
@@ -37,7 +37,7 @@ xfs_stats_clear_proc_handler( | |||
37 | ret = proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); | 37 | ret = proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); |
38 | 38 | ||
39 | if (!ret && write && *valp) { | 39 | if (!ret && write && *valp) { |
40 | printk("XFS Clearing xfsstats\n"); | 40 | xfs_notice(NULL, "Clearing xfsstats"); |
41 | for_each_possible_cpu(c) { | 41 | for_each_possible_cpu(c) { |
42 | preempt_disable(); | 42 | preempt_disable(); |
43 | /* save vn_active, it's a universal truth! */ | 43 | /* save vn_active, it's a universal truth! */ |