History

fs: use appropriate printk priority levels

printk()s without a priority level default to KERN_WARNING. To reduce noise at KERN_WARNING, this patch set the priority level appriopriately for unleveled printks()s. This should be useful to folks that look at dmesg warnings closely.

Mandeep Singh Baines committed 15 years ago

Commit 80cdc6d1 parent 3e505943 files · +4 −3Browse files

Unified · Split

3 files
  1. fs/bio.c +1 −1
  2. fs/namespace.c +1 −1
  3. init/do_mounts.c +2 −1
fs/bio.c+1−1
@@ -111,7 +111,7 @@ static struct kmem_cache *bio_find_or_create_slab(unsigned int extra_size) · 110 unmodified lines
111111 if (!slab)
112112 goto out_unlock;
113113
114− printk("bio: create slab <%s> at %d\n", bslab->name, entry);
114+ printk(KERN_INFO "bio: create slab <%s> at %d\n", bslab->name, entry);
115115 bslab->slab = slab;
116116 bslab->slab_ref = 1;
117117 bslab->slab_size = sz;
fs/namespace.c+1−1
@@ -2701,7 +2701,7 @@ void __init mnt_init(void) · 2700 unmodified lines
27012701 if (!mount_hashtable)
27022702 panic("Failed to allocate mount hash table\n");
27032703
2704− printk("Mount-cache hash table entries: %lu\n", HASH_SIZE);
2704+ printk(KERN_INFO "Mount-cache hash table entries: %lu\n", HASH_SIZE);
27052705
27062706 for (u = 0; u < HASH_SIZE; u++)
27072707 INIT_LIST_HEAD(&mount_hashtable[u]);
init/do_mounts.c+2−1
@@ -293,7 +293,8 @@ static int __init do_mount_root(char *name, char *fs, int flags, void *data) · 292 unmodified lines
293293
294294 sys_chdir((const char __user __force *)"/root");
295295 ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev;
296− printk("VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
296+ printk(KERN_INFO
297+ "VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
297298 current->fs->pwd.mnt->mnt_sb->s_type->name,
298299 current->fs->pwd.mnt->mnt_sb->s_flags & MS_RDONLY ?
299300 " readonly" : "", MAJOR(ROOT_DEV), MINOR(ROOT_DEV));