Re: Bug in ext4/btrfs fallocate?

2010-12-29 Thread Marco Stornelli
Il 29/12/2010 07:46, Andreas Dilger ha scritto: > On 2010-12-28, at 09:06, Marco Stornelli wrote: >> it seems that ext4/btrfs code for fallocate doesn't check for >> immutable/append inode flag. > > fallocate() probably shouldn't be allowed for immutable files, but it makes a > lot of sense to ca

[PATCH V2 0/6] random bugfixes of the space management

2010-12-29 Thread Miao Xie
Hello, Chris I have a bunch of random fixes of the space management in git://repo.or.cz/linux-btrfs-devel.git space-manage They are the ENOSPC fixes, as well as fixes for df command. The first one and the last one fixed the wrong free space information reported by df command. The second one fixe

[PATCH V2 3/6] btrfs: fix wrong calculation of stripe size

2010-12-29 Thread Miao Xie
There are two tiny problem: - One is When we check the chunk size is greater than the max chunk size or not, we should take mirrors into account, but the original code didn't. - The other is btrfs shouldn't use the size of the residual free space as the length of of a dup chunk when doing chunk

[PATCH V2 1/6] btrfs: fix wrong data space statistics

2010-12-29 Thread Miao Xie
Josef has implemented mixed data/metadata chunks, we must add those chunks' space just like data chunks. Signed-off-by: Miao Xie --- fs/btrfs/super.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 61bd79a..1d21208 100644 -

[PATCH V2 2/6] btrfs: try to reclaim some space when chunk allocation fails

2010-12-29 Thread Miao Xie
We cannot write data into files when when there is tiny space in the filesystem. Reproduce steps: # mkfs.btrfs /dev/sda1 # mount /dev/sda1 /mnt # dd if=/dev/zero of=/mnt/tmpfile0 bs=4K count=1 # dd if=/dev/zero of=/mnt/tmpfile1 bs=4K count=99 (fill the filesystem) # umount /mnt

[PATCH V2 5/6] btrfs: make the chunk allocator utilize the devices better

2010-12-29 Thread Miao Xie
With this patch, we change the handling method when we can not get enough free extents with default size. Implementation: 1. Look up the suitable free extent on each device and keep the search result. If not find a suitable free extent, keep the max free extent 2. If we get enough suitable free

[PATCH V2 6/6] btrfs: fix wrong free space information of btrfs

2010-12-29 Thread Miao Xie
When we store data by raid profile in btrfs with two or more different size disks, df command shows there is some free space in the filesystem, but the user can not write any data in fact, df command shows the wrong free space information of btrfs. # mkfs.btrfs -d raid1 /dev/sda9 /dev/sda10 # bt

[PATCH V2 4/6] btrfs: restructure find_free_dev_extent()

2010-12-29 Thread Miao Xie
- make it return the start position and length of the max free space when it can not find a suitable free space. - make it more readability Signed-off-by: Miao Xie --- fs/btrfs/extent-tree.c |4 +- fs/btrfs/volumes.c | 155 +++ 2 files chang

list files on a device

2010-12-29 Thread Lubos Kolouch
Hello, After another power loss (I am fortune, am I not?) I have the following situation : Label: none uuid: ac155851-0e31-4aed-9ba4-ee712506368a Total devices 3 FS bytes used 1.02TB devid1 size 931.51GB used 70.00GB path /dev/sdd1 devid3 size 1.79TB used 66.52GB

[PATCH] fix return value when mount fail

2010-12-29 Thread Dave Young
I happened to pass swap partition as root partition in cmdline, then kernel panic and tell me about "Cannot open root device". It is not correct, in fact it is a mount failer instead of 'no device'. Eventually I found btrfs mounting failed with -EIO, it should be -EINVAL. Here fix the return valu

[PATCH] btrfs: Require CAP_SYS_ADMIN for filesystem rebalance

2010-12-29 Thread Ben Hutchings
Filesystem rebalancing (BTRFS_IOC_BALANCE) affects the entire filesystem and may run uninterruptibly for a long time. This does not seem to be something that an unprivileged user should be able to do. Reported-by: Aron Xu Signed-off-by: Ben Hutchings --- fs/btrfs/volumes.c |4 1 files

Re: list files on a device

2010-12-29 Thread Lubos Kolouch
Lubos Kolouch, Wed, 29 Dec 2010 13:50:41 +: > Hello, > > After another power loss (I am fortune, am I not?) I have the following > situation : > > Label: none uuid: ac155851-0e31-4aed-9ba4-ee712506368a > Total devices 3 FS bytes used 1.02TB > devid1 size 931.51GB used 70.00G

Reproducible kernel BUG while using VirtualBox:

2010-12-29 Thread Kenneth Lakin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I believe that I can pretty reliably reproduce the BUG mentioned in the attached dmesg output. (This doesn't mean that you can, but I'll detail what I've done here.) [This BUG is the same one that I reported last night.] 1) Create a 2 GB dynamic

Re: Reproducible kernel BUG while using VirtualBox:

2010-12-29 Thread Li Zefan
Kenneth Lakin wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > All, > > I believe that I can pretty reliably reproduce the BUG mentioned in the > attached dmesg output. (This doesn't mean that you can, but I'll detail > what I've done here.) [This BUG is the same one that I reported l