Re: revert to static snapshot on reboot

2012-01-09 Thread Hugo Mills
On Sun, Jan 08, 2012 at 10:43:04PM -0800, bt...@spiritvideo.com wrote: Hi all -- I just installed my first btrfs-based linux tonight, and I must say it gives me a very warm feeling! Congratulations on all your hard work and your fine product. I administer laptops for a small school, and

Re: [PATCH 0/2] btrfs: allow cross-subvolume BTRFS_IOC_CLONE

2012-01-09 Thread Jérôme Poulin
On Mon, Jan 9, 2012 at 1:58 AM, Marios Titas redneb8...@gmail.com wrote: The simple case of 'cp --reflink' works fine [...] It doesn't work here: cp: failed to clone `/tmp/test': Invalid cross-device link That's with 3.1 + for-linus. This is the problem, it doesn't work because you have to

Re: [PATCH 00/21] Btrfs: restriper

2012-01-09 Thread Ilya Dryomov
On Mon, Jan 09, 2012 at 01:50:34AM -0500, Marios Titas wrote: I tried this for many different scenarios and it seems to work pretty well. I only ran into one problematic case: If you remove a device from a multidevice filesystem it crashes. Here's how to reproduce it: truncate -s1g

Re: How long does it take to balance a 2x1TB RAID1 ?

2012-01-09 Thread Phillip Susi
On 1/6/2012 6:23 AM, Dirk Lutzebäck wrote: Hi, I have setup up a btrfs RAID1 using two 1TB drives. How long should a 'btrfs filesystem balance' take? It is running now for more than 3 days on about 30% CPU and 40% wait state. I am using stock btrfs from ubuntu 11.10 kernel 3.0.0 Not nearly

Re: [PATCH] btrfs: change resize ioctl to take device path instead of id

2012-01-09 Thread Phillip Susi
Bump. On 12/11/2011 10:12 PM, Phillip Susi wrote: The resize ioctl took an optional argument that was a string representation of the devid which you wish to resize. For the sake of consistency with the other ioctls that take a device argument, I converted this to take a device path instead of

[PATCH 2/2] btrfs-progs: document --rootdir mkfs switch

2012-01-09 Thread Phillip Susi
Signed-off-by: Phillip Susi ps...@cfl.rr.com --- man/mkfs.btrfs.8.in |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/man/mkfs.btrfs.8.in b/man/mkfs.btrfs.8.in index 542e6cf..25e817b 100644 --- a/man/mkfs.btrfs.8.in +++ b/man/mkfs.btrfs.8.in @@ -12,6 +12,7 @@

[PATCH 1/2] btrfs-progs: removed extraneous whitespace from mkfs man page

2012-01-09 Thread Phillip Susi
There were extra spaces around some of the arguments in the man page for mkfs. Signed-off-by: Phillip Susi ps...@cfl.rr.com --- man/mkfs.btrfs.8.in | 19 ++- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/man/mkfs.btrfs.8.in b/man/mkfs.btrfs.8.in index

Odd behavior of subvolume find-new

2012-01-09 Thread David Brown
I've been creating some time-based snapshots, e.g. # btrfs subvolume snapshot @root 2012-01-09-@root After some changes, I wanted to see what had changed, so I tried: # btrfs subvolume find-new @root 2012-01-09-@root transid marker was 37 which doesn't print anything out.

Multiple btrfsck inode error 400 on Unclean Shutdowns

2012-01-09 Thread Mitch Harder
Lately, I've been running into a sharp increase in btrfsck inode 400 corruptions after an unclean shutdown. The shutdowns have resulted from multiple sources (power outage, Xorg keyboard misconfiguration, etc...). I have not made any systematic study of btrfs' robustness to corruption after an

btrfs-related kernel oops due to media error

2012-01-09 Thread Vincent Vanackere
Hi, One of my disks, partitioned into a single btrfs partition, is showing media errors. The problem is that these errors lead to kernel panic from btrfs - that make the filesystem unusable until reboot - and therefore it is very hard for me to do a full backup of the data prior to changing

[PATCH V2 1/3] Btrfs: fix btrfsck error 400 when truncating a compressed file extent

2012-01-09 Thread Miao Xie
Reproduce steps: # mkfs.btrfs /dev/sdb5 # mount /dev/sdb5 -o compress=lzo /mnt # dd if=/dev/zero of=/mnt/tmpfile bs=128K count=1 # sync # truncate -s 64K /mnt/tmpfile # btrfsck /dev/sdb5 root 5 inode 257 errors 400 This is because of the wrong if condition, which is used to check if we

[PATCH V2 2/3] Btrfs: make btrfs_truncate_inode_items() more readable

2012-01-09 Thread Miao Xie
As the title said, this patch just make the functions of the truncation more readable. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- Changes v1 - v2: - move return sentence out of if...else..., make the logic of the code more clear. --- fs/btrfs/inode.c | 292

[PATCH V2 3/3] Btrfs: improve truncation of btrfs

2012-01-09 Thread Miao Xie
The original truncation of btrfs has a bug, that is the orphan item will not be dropped when the truncation fails. This bug will trigger BUG() when unlink that truncated file. And besides that, if the user does pre-allocation for the file which is truncated unsuccessfully, after

[RFC PATCH v2 0/3] Btrfs: apply the Probabilistic Skiplist on btrfs

2012-01-09 Thread Liu Bo
Since we are inclined to apply a lockless scheme on some objects of btrfs for higher performance, we want to build a RCU version the Probabilistic Skiplist. Here our skiplist algorithm is based on the skiplist experiments of Con Kolivas ker...@kolivas.org for BFS cpu scheduler. And more details

[RFC PATCH v2 3/3] Btrfs: convert rwlock to RCU for extent_map

2012-01-09 Thread Liu Bo
In this patch, we make two things: a) skiplist - rcu-skiplist This is quite direct, since in skiplist each level is a list, any modification to the skiplist refers to pointers change, which fits RCU's sematic. b) use rcu lock for reader side and mutex lock for updater side to protect

[RFC PATCH v2 2/3] Btrfs: rebuild extent_map based on skiplist

2012-01-09 Thread Liu Bo
extent_map applies a read more senario, since we want to build a RCU-skiplist later, we build a new version extent_map based on skiplist firstly. Signed-off-by: Liu Bo liubo2...@cn.fujitsu.com --- fs/btrfs/extent_map.c | 258 -