aboutsummaryrefslogtreecommitdiffstats
path: root/fs/affs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/affs/super.c')
-rw-r--r--fs/affs/super.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/fs/affs/super.c b/fs/affs/super.c
index 895ac7dc9dbf..51f1a95bff73 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -46,7 +46,7 @@ static void
46affs_put_super(struct super_block *sb) 46affs_put_super(struct super_block *sb)
47{ 47{
48 struct affs_sb_info *sbi = AFFS_SB(sb); 48 struct affs_sb_info *sbi = AFFS_SB(sb);
49 pr_debug("AFFS: put_super()\n"); 49 pr_debug("%s()\n", __func__);
50 50
51 cancel_delayed_work_sync(&sbi->sb_work); 51 cancel_delayed_work_sync(&sbi->sb_work);
52} 52}
@@ -220,7 +220,7 @@ parse_options(char *options, kuid_t *uid, kgid_t *gid, int *mode, int *reserved,
220 return 0; 220 return 0;
221 if (n != 512 && n != 1024 && n != 2048 221 if (n != 512 && n != 1024 && n != 2048
222 && n != 4096) { 222 && n != 4096) {
223 printk ("AFFS: Invalid blocksize (512, 1024, 2048, 4096 allowed)\n"); 223 pr_warn("Invalid blocksize (512, 1024, 2048, 4096 allowed)\n");
224 return 0; 224 return 0;
225 } 225 }
226 *blocksize = n; 226 *blocksize = n;
@@ -285,8 +285,8 @@ parse_options(char *options, kuid_t *uid, kgid_t *gid, int *mode, int *reserved,
285 /* Silently ignore the quota options */ 285 /* Silently ignore the quota options */
286 break; 286 break;
287 default: 287 default:
288 printk("AFFS: Unrecognized mount option \"%s\" " 288 pr_warn("Unrecognized mount option \"%s\" or missing value\n",
289 "or missing value\n", p); 289 p);
290 return 0; 290 return 0;
291 } 291 }
292 } 292 }
@@ -319,7 +319,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
319 319
320 save_mount_options(sb, data); 320 save_mount_options(sb, data);
321 321
322 pr_debug("AFFS: read_super(%s)\n",data ? (const char *)data : "no options"); 322 pr_debug("read_super(%s)\n", data ? (const char *)data : "no options");
323 323
324 sb->s_magic = AFFS_SUPER_MAGIC; 324 sb->s_magic = AFFS_SUPER_MAGIC;
325 sb->s_op = &affs_sops; 325 sb->s_op = &affs_sops;
@@ -339,7 +339,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
339 if (!parse_options(data,&uid,&gid,&i,&reserved,&root_block, 339 if (!parse_options(data,&uid,&gid,&i,&reserved,&root_block,
340 &blocksize,&sbi->s_prefix, 340 &blocksize,&sbi->s_prefix,
341 sbi->s_volume, &mount_flags)) { 341 sbi->s_volume, &mount_flags)) {
342 printk(KERN_ERR "AFFS: Error parsing options\n"); 342 pr_err("Error parsing options\n");
343 return -EINVAL; 343 return -EINVAL;
344 } 344 }
345 /* N.B. after this point s_prefix must be released */ 345 /* N.B. after this point s_prefix must be released */
@@ -356,7 +356,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
356 */ 356 */
357 357
358 size = sb->s_bdev->bd_inode->i_size >> 9; 358 size = sb->s_bdev->bd_inode->i_size >> 9;
359 pr_debug("AFFS: initial blocksize=%d, #blocks=%d\n", 512, size); 359 pr_debug("initial blocksize=%d, #blocks=%d\n", 512, size);
360 360
361 affs_set_blocksize(sb, PAGE_SIZE); 361 affs_set_blocksize(sb, PAGE_SIZE);
362 /* Try to find root block. Its location depends on the block size. */ 362 /* Try to find root block. Its location depends on the block size. */
@@ -371,7 +371,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
371 sbi->s_root_block = root_block; 371 sbi->s_root_block = root_block;
372 if (root_block < 0) 372 if (root_block < 0)
373 sbi->s_root_block = (reserved + size - 1) / 2; 373 sbi->s_root_block = (reserved + size - 1) / 2;
374 pr_debug("AFFS: setting blocksize to %d\n", blocksize); 374 pr_debug("setting blocksize to %d\n", blocksize);
375 affs_set_blocksize(sb, blocksize); 375 affs_set_blocksize(sb, blocksize);
376 sbi->s_partition_size = size; 376 sbi->s_partition_size = size;
377 377
@@ -386,7 +386,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
386 * block behind the calculated one. So we check this one, too. 386 * block behind the calculated one. So we check this one, too.
387 */ 387 */
388 for (num_bm = 0; num_bm < 2; num_bm++) { 388 for (num_bm = 0; num_bm < 2; num_bm++) {
389 pr_debug("AFFS: Dev %s, trying root=%u, bs=%d, " 389 pr_debug("Dev %s, trying root=%u, bs=%d, "
390 "size=%d, reserved=%d\n", 390 "size=%d, reserved=%d\n",
391 sb->s_id, 391 sb->s_id,
392 sbi->s_root_block + num_bm, 392 sbi->s_root_block + num_bm,
@@ -407,8 +407,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
407 } 407 }
408 } 408 }
409 if (!silent) 409 if (!silent)
410 printk(KERN_ERR "AFFS: No valid root block on device %s\n", 410 pr_err("No valid root block on device %s\n", sb->s_id);
411 sb->s_id);
412 return -EINVAL; 411 return -EINVAL;
413 412
414 /* N.B. after this point bh must be released */ 413 /* N.B. after this point bh must be released */
@@ -420,7 +419,7 @@ got_root:
420 /* Find out which kind of FS we have */ 419 /* Find out which kind of FS we have */
421 boot_bh = sb_bread(sb, 0); 420 boot_bh = sb_bread(sb, 0);
422 if (!boot_bh) { 421 if (!boot_bh) {
423 printk(KERN_ERR "AFFS: Cannot read boot block\n"); 422 pr_err("Cannot read boot block\n");
424 return -EINVAL; 423 return -EINVAL;
425 } 424 }
426 memcpy(sig, boot_bh->b_data, 4); 425 memcpy(sig, boot_bh->b_data, 4);
@@ -433,8 +432,7 @@ got_root:
433 */ 432 */
434 if ((chksum == FS_DCFFS || chksum == MUFS_DCFFS || chksum == FS_DCOFS 433 if ((chksum == FS_DCFFS || chksum == MUFS_DCFFS || chksum == FS_DCOFS
435 || chksum == MUFS_DCOFS) && !(sb->s_flags & MS_RDONLY)) { 434 || chksum == MUFS_DCOFS) && !(sb->s_flags & MS_RDONLY)) {
436 printk(KERN_NOTICE "AFFS: Dircache FS - mounting %s read only\n", 435 pr_notice("Dircache FS - mounting %s read only\n", sb->s_id);
437 sb->s_id);
438 sb->s_flags |= MS_RDONLY; 436 sb->s_flags |= MS_RDONLY;
439 } 437 }
440 switch (chksum) { 438 switch (chksum) {
@@ -468,14 +466,14 @@ got_root:
468 sb->s_flags |= MS_NOEXEC; 466 sb->s_flags |= MS_NOEXEC;
469 break; 467 break;
470 default: 468 default:
471 printk(KERN_ERR "AFFS: Unknown filesystem on device %s: %08X\n", 469 pr_err("Unknown filesystem on device %s: %08X\n",
472 sb->s_id, chksum); 470 sb->s_id, chksum);
473 return -EINVAL; 471 return -EINVAL;
474 } 472 }
475 473
476 if (mount_flags & SF_VERBOSE) { 474 if (mount_flags & SF_VERBOSE) {
477 u8 len = AFFS_ROOT_TAIL(sb, root_bh)->disk_name[0]; 475 u8 len = AFFS_ROOT_TAIL(sb, root_bh)->disk_name[0];
478 printk(KERN_NOTICE "AFFS: Mounting volume \"%.*s\": Type=%.3s\\%c, Blocksize=%d\n", 476 pr_notice("Mounting volume \"%.*s\": Type=%.3s\\%c, Blocksize=%d\n",
479 len > 31 ? 31 : len, 477 len > 31 ? 31 : len,
480 AFFS_ROOT_TAIL(sb, root_bh)->disk_name + 1, 478 AFFS_ROOT_TAIL(sb, root_bh)->disk_name + 1,
481 sig, sig[3] + '0', blocksize); 479 sig, sig[3] + '0', blocksize);
@@ -506,11 +504,11 @@ got_root:
506 504
507 sb->s_root = d_make_root(root_inode); 505 sb->s_root = d_make_root(root_inode);
508 if (!sb->s_root) { 506 if (!sb->s_root) {
509 printk(KERN_ERR "AFFS: Get root inode failed\n"); 507 pr_err("AFFS: Get root inode failed\n");
510 return -ENOMEM; 508 return -ENOMEM;
511 } 509 }
512 510
513 pr_debug("AFFS: s_flags=%lX\n",sb->s_flags); 511 pr_debug("s_flags=%lX\n", sb->s_flags);
514 return 0; 512 return 0;
515} 513}
516 514
@@ -530,7 +528,7 @@ affs_remount(struct super_block *sb, int *flags, char *data)
530 char volume[32]; 528 char volume[32];
531 char *prefix = NULL; 529 char *prefix = NULL;
532 530
533 pr_debug("AFFS: remount(flags=0x%x,opts=\"%s\")\n",*flags,data); 531 pr_debug("%s(flags=0x%x,opts=\"%s\")\n", __func__, *flags, data);
534 532
535 sync_filesystem(sb); 533 sync_filesystem(sb);
536 *flags |= MS_NODIRATIME; 534 *flags |= MS_NODIRATIME;
@@ -578,8 +576,9 @@ affs_statfs(struct dentry *dentry, struct kstatfs *buf)
578 int free; 576 int free;
579 u64 id = huge_encode_dev(sb->s_bdev->bd_dev); 577 u64 id = huge_encode_dev(sb->s_bdev->bd_dev);
580 578
581 pr_debug("AFFS: statfs() partsize=%d, reserved=%d\n",AFFS_SB(sb)->s_partition_size, 579 pr_debug("%s() partsize=%d, reserved=%d\n",
582 AFFS_SB(sb)->s_reserved); 580 __func__, AFFS_SB(sb)->s_partition_size,
581 AFFS_SB(sb)->s_reserved);
583 582
584 free = affs_count_free_blocks(sb); 583 free = affs_count_free_blocks(sb);
585 buf->f_type = AFFS_SUPER_MAGIC; 584 buf->f_type = AFFS_SUPER_MAGIC;