lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 18 Aug 2009 23:21:49 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Mark Lord <lkml@....ca>
Cc:	Kay Sievers <kay.sievers@...y.org>, linux-btrfs@...r.kernel.org,
	Chris Mason <chris.mason@...cle.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: Why does stat() return invalid st_dev field for btrfs ??

On Mon, Aug 17 2009, Mark Lord wrote:
> Kay Sievers wrote:
>> On Mon, Aug 17, 2009 at 22:47, Mark Lord<lkml@....ca> wrote:
>>> Chris / list,
>>>
>>> stat(2) seems to return invalid major/minor device info
>>> for btrfs filesystems.
>>>
>>> Why?  Is this a bug?
>>
>> This is not invalid and not a bug. It's a superblock without a device,
>> and expected behavior.
>>
>> There is no one-to-one relation from a btrfs mountpoint to a device,
>> it's a tree, and therefore therefore there can not be a single
>> major/minor.
> ..
>
> Sure there is for the most common case.
> When there is only a single device, stat() should return that device.
> When there are several, it should do something different.

I actually think it's quite sane, since then you get the same behaviour
on multi vs single disk file systems. The last thing you want is to have
different behaviour when you later add a disk, for instance.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ