Uppercase BTRFS follows the convention of __btrfs_std_error. It's also the same 
convention other linux filesystems use. I'd view the printks that are already 
there as ad-hoc, to be replaced by a standard fs call that will perform 
formatting.

-Jeff

--
Jeff Mahoney
(apologies for the top post -- from my mobile)

On Oct 10, 2011, at 12:43 PM, "David Sterba <d...@jikos.cz>" <d...@jikos.cz> 
wrote:

> On Mon, Oct 03, 2011 at 11:22:31PM -0400, Jeff Mahoney wrote:
>> @@ -143,6 +146,36 @@ void __btrfs_std_error(struct btrfs_fs_i
>>    btrfs_handle_error(fs_info);
>> }
>> 
>> +/*
>> + * __btrfs_panic decodes unexpected, fatal errors from the caller,
>> + * issues an alert, and either panics or BUGs, depending on mount options.
>> + */
>> +void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function,
>> +           unsigned int line, int errno, const char *fmt, ...)
>> +{
>> +    char nbuf[16];
>> +    char *s_id = "<unknown>";
>> +    const char *errstr;
>> +    struct va_format vaf = { .fmt = fmt };
>> +    va_list args;
>> +
>> +    if (fs_info)
>> +        s_id = fs_info->sb->s_id;
>> +
>> +    va_start(args, fmt);
>> +    vaf.va = &args;
>> +
>> +    errstr = btrfs_decode_error(fs_info, errno, nbuf);
>> +    if (fs_info->mount_opt & BTRFS_MOUNT_PANIC_ON_FATAL_ERROR)
>> +        panic(KERN_CRIT "BTRFS panic (device %s) in %s:%d: %pV (%s)\n",
>                                 ^^^^^
> "btrfs"
> Most messages use lowercase btrfs, let's keep it like that (apart from
> missing btrfs prefixes at all or 3x Btrfs)
> 
>> +            s_id, function, line, &vaf, errstr);
>> +
>> +    printk(KERN_CRIT "BTRFS panic (device %s) in %s:%d: %pV (%s)\n",
>                          ^^^^^
> 
>> +           s_id, function, line, &vaf, errstr);
>> +    va_end(args);
>> +    /* Caller calls BUG() */
>> +}
>> +
>> static void btrfs_put_super(struct super_block *sb)
>> {
>>    struct btrfs_root *root = btrfs_sb(sb);

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to