btrfs flush data cache

2013-10-25 Thread lilofile
transaction_kthread can periodically commit data and metedata to disk,similarly btrfs_writepages can write data page to disk, in which situation btrfs_writepages function is called? and i cannot find btrfs_writepages is called in btrfs code? who can tell me? -- To unsubscribe from this

btrfs_run_delayed_refs

2013-10-25 Thread lilofile
what does the function btrfs_run_delayed_refs means? At the start of the function there is a simple explanation, who can give me a detailed explanation ? -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo

Re: Why cannot I move a read-only snapshot around?

2013-10-25 Thread Karl Kiniger
On Thu 131024, Chris Murphy wrote: On Oct 24, 2013, at 4:46 PM, Karl Kiniger karl.kini...@med.ge.com wrote: Still hoping there is a better way on btrfs than sending and receiving the snaps just to a different folder. Presumably you can rename/move the containing folder. So

[PATCH] Btrfs-progs: don't output baffling message when checking a fresh fs

2013-10-25 Thread Miao Xie
As we know, a new fs doesn't have space cache, so we set the cache generation of the super block to be -1ULL, it is not equal to the fs generation. But the check program didn't consider this case, and output the following message cache and super generation don't match, space cache will be

[PATCH] Btrfs: fix the free space write out failure when there is no data space

2013-10-25 Thread Miao Xie
After running space balance on a new fs, the fs check program outputed the following warning message: free space inode generation (0) did not match free space cache generation (20) Steps to reproduce: # mkfs.btrfs -f dev # mount dev mnt # btrfs balance start mnt # umount mnt # btrfs check

Re: swapfile on btrfs, temporary solution for wiki

2013-10-25 Thread dima
On 10/25/2013 05:52 AM, Timofey Titovets wrote: Hello, i suggest temporary solution to use swap file under btrfs. I test it, and it work good. I invent simple the way, how create and using swap file, just see following sh code: swapfile=$(losetup -f) #free loop device truncate -s 8G /swap

Re: [PATCH 3/3] btrfs-progs: separate command ant implementation of chunk-recover code

2013-10-25 Thread David Sterba
On Thu, Oct 24, 2013 at 03:31:55PM -0500, Mitch Harder wrote: On Tue, Sep 17, 2013 at 10:21 AM, David Sterba dste...@suse.cz wrote: The command has been moved and we should rename the files accordingly, so the entry point is now in cmds-rescue.c and the core functionality in it's own file.

Re: swapfile on btrfs, temporary solution for wiki

2013-10-25 Thread Roman Mamedov
On Thu, 24 Oct 2013 23:52:01 +0300 Timofey Titovets nefelim...@gmail.com wrote: Hello, i suggest temporary solution to use swap file under btrfs. I test it, and it work good. I invent simple the way, how create and using swap file, just see following sh code: swapfile=$(losetup -f) #free

[PATCH] Btrfs: remove scrub_super_lock holding in btrfs_sync_log()

2013-10-25 Thread Wang Shilong
Originally, we introduced scrub_super_lock to synchronize tree log code with scrubbing super. However we can replace scrub_super_lock with device_list_mutex, because writing super will hold this mutex, this will reduce an extra lock holding when writing supers in sync log code. Signed-off-by:

btrfs send/receive do not keep inode ctimes

2013-10-25 Thread Karl Kiniger
Hello insiders is there low level support to change inode ctimes somehow? (on ext[234] it can be done using debugfs) It would be nice to make received snapshots as similar as possible to their send source. (I am not talking about uuids and such, just ls -lc output) creative ideas are welcome,

Re: Unable to mount partition

2013-10-25 Thread Geert Van Damme
I was reading the other messages in the mailing list, and tried the advice on http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg27524.html I checked out the latest code, did a make of the btrfs-tools # sudo btrfs rescue chunk-recover -vy /dev/sda1 All Devices: Device: id = 1,

rm with quotas can cause panic (was Re: Lots of trouble hanging when rm files with many extents)

2013-10-25 Thread John Goerzen
John Goerzen jgoerzen at complete.org writes: On 10/20/2013 09:51 AM, Tomasz Chmielewski wrote: I'll do some more tests with lots of extents to see if it's reproducible here as well. Interestingly, I've generally had qgroups enabled here as well, possibly on all of these systems.

Excessive RAM usage in btrfs_inode btrfs_delayed_node

2013-10-25 Thread John Goerzen
Hello, This is an x86_64 box running 3.10. It is presently running restore from the e2fs dump/restore, restoring a dump made on an ext4 system onto a btrfs filesystem. The btrfs filesystem is the only btrfs filesystem mounted on the machine, and it is mounted with only the noatime mount option.

[PATCH] Btrfs: stop using vfs_read in send

2013-10-25 Thread Josef Bacik
Apparently we don't actually close the files until we return to userspace, so stop using vfs_read in send. This is actually better for us since we can avoid all the extra logic of holding the file we're sending open and making sure to clean it up. This will fix people who have been hitting too

[PATCH 1/2] btrfs-progs: mechanism to fetch fsinfo from btrfs-control

2013-10-25 Thread Anand Jain
need fsinfo from btrfs-control that is when mount path is not known. current method of going through each mount points isn't efficient, and multiple subvol of a fsid could be mounted means extra logic to handle that. Further this will help to revamp check_mounted()

[PATCH 2/2] btrfs-progs: fs show should handle if subvol(s) mounted

2013-10-25 Thread Anand Jain
as of now with out this patch user would see fsinfo per btrfs mount path but which mean multiple entry if more than one subvol is mounted of the same fsid. so this patch will handle that nicely. Signed-off-by: Anand Jain anand.j...@oracle.com --- cmds-filesystem.c | 90

[PATCH] btrfs: add framework to read fs info from btrfs-control

2013-10-25 Thread Anand Jain
This adds ioctl BTRFS_IOC_GET_FSIDS which reads the fs info through the btrfs-control Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/super.c | 47 ++- fs/btrfs/volumes.c | 33 ++

[PATCH] Btrfs-progs: allow --init-extent-tree to work when extent tree is borked

2013-10-25 Thread Josef Bacik
Unfortunately you can't run --init-extent-tree if you can't actually read the extent root. Fix this by allowing partial starts with no extent root and then have fsck only check to see if the extent root is uptodate _after_ the check to see if we are init'ing the extent tree. Thanks,

Re: [PATCH] Btrfs-progs: allow --init-extent-tree to work when extent tree is borked

2013-10-25 Thread Martin
On 25/10/13 19:01, Josef Bacik wrote: Unfortunately you can't run --init-extent-tree if you can't actually read the extent root. Fix this by allowing partial starts with no extent root and then have fsck only check to see if the extent root is uptodate _after_ the check to see if we are

Re: [PATCH] Btrfs-progs: allow --init-extent-tree to work when extent tree is borked

2013-10-25 Thread Josef Bacik
On Fri, Oct 25, 2013 at 07:27:24PM +0100, Martin wrote: On 25/10/13 19:01, Josef Bacik wrote: Unfortunately you can't run --init-extent-tree if you can't actually read the extent root. Fix this by allowing partial starts with no extent root and then have fsck only check to see if the

btrfs unable to mount

2013-10-25 Thread luvar
Hi I have similar (not same) problem like described here: http://www.spinics.net/lists/linux-btrfs/msg27102.html So I want just make Josef to have some fun seeing btrfs-image of unmountable filesystem, before btrfs-zero-log command... Two images and explanatory text is available on here:

[PATCH] Btrfs: do not bug_on if we try to cow a free space cache inode

2013-10-25 Thread Josef Bacik
We can just return an error and we'll bail out properly. We still want to catch this case to make sure we don't have a bug somewhere, so just warn if this pops up. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/inode.c | 5 - 1 file changed, 4 insertions(+), 1

[PATCH] Btrfs: return an error from btrfs_wait_ordered_range

2013-10-25 Thread Josef Bacik
I noticed that if the free space cache has an error writing out it's data it won't actually error out, it will just carry on. This is because it doesn't check the return value of btrfs_wait_ordered_range, which didn't actually return anything. So fix this in order to keep us from making free

[PATCH] Btrfs: don't abort transaction in run_delalloc_nocow

2013-10-25 Thread Josef Bacik
This is just the write path, the only reason we start a transaction is so we can check cross references, we don't make any actual changes, so there is no reason to abort the transaction if we fail. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/inode.c | 20

[patch 1/3] [PATCH 1/3] xfstests: add test for global metadata reservation publishing

2013-10-25 Thread Jeff Mahoney
My publishing patchset added the ability for the kernel to report the size of the global metadata reservation via ioctl and sysfs. This test confirms that we get sane results on an empty file system. ENOTTY and missing /sys/fs/btrfs/fsid/allocation are not considered failures. Signed-off-by:

[patch 3/3] [PATCH 3/3] xfstests: add tests for new feature ioctl and sysfs interfaces

2013-10-25 Thread Jeff Mahoney
This tests the exporting of feature information from the kernel via sysfs and ioctl. The first test works whether the sysfs permissions are correct, if the information exported via sysfs matches what the ioctls are reporting, and if they both match the on-disk superblock's version of the feature

[patch 0/3] xfstests: tests for btrfs publishing/export patchset

2013-10-25 Thread Jeff Mahoney
These are the tests that Josef requested accompany the submission of the btrfs publishing/export patchset[1]. 100: Test new global metadata reservation ioctl 101: Test new sysfs exporting of allocation and device membership 102: Test new sysfs exporting of feature bits 103: Test setting/clearing

[patch 2/3] [PATCH 2/3] xfstests: add test for sysfs publication of btrfs info

2013-10-25 Thread Jeff Mahoney
This tests the sysfs publishing for btrfs allocation and device membership info under a number of different layouts, similar to the btrfs replace test. We test the allocation files only for existence and that they contain numerical values. We test the device membership by mapping the devices used

Re: [patch 0/3] xfstests: tests for btrfs publishing/export patchset

2013-10-25 Thread Jeff Mahoney
On 10/25/13, 4:52 PM, Jeff Mahoney wrote: These are the tests that Josef requested accompany the submission of the btrfs publishing/export patchset[1]. 100: Test new global metadata reservation ioctl 101: Test new sysfs exporting of allocation and device membership 102: Test new sysfs

BTRFS critical: unable to find logical, No mapping for

2013-10-25 Thread Tomasz Chmielewski
Just saw this with 3.12-rc6: [57459.603773] [ cut here ] [57459.603798] WARNING: CPU: 6 PID: 30148 at fs/btrfs/ctree.c:1322 btrfs_search_old_slot+0x338/0x81d [btrfs]() [57459.603812] Modules linked in: veth ipt_MASQUERADE iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4

btrfs raid0 unable to mount

2013-10-25 Thread lilofile
when I use two disk to create raid0 in btrfs, after rebooting system,one disk unable to mount , error is as follows: mount: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try

Re: Why cannot I move a read-only snapshot around?

2013-10-25 Thread Christian Robert
you can change a ro snapshot into a rw snapshot you just snapshot it without the -r option ex: # btrfs subv snap -r linux-3.12-rc5 snap_ro Create a readonly snapshot of 'linux-3.12-rc5' in './snap_ro' # touch ./snap_ro/helo touch: cannot touch ‘./snap_ro/helo’: Read-only file system # btrfs