btrfs: add mount option to set commit interval
Quoted 10 lines
Quoted 6 lines
Another newbie question is which version of the kernel do I need to have in order to cleanly apply this patch? I am finding that it fails to apply to the current stable kernel code (as of now it is v3.10.4) which makes me think your patch has to be applied to a newer one? Are you patching against the linux git tree meaning I have to use the 3.11 series to try your code?
Try Josef's btrfs-next repo:
OK! I can patch successfully into that git repo:
% cd /tmp/work
% git clone git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git
% cd btrfs
% patch -Np1 -i btrfs_add_mount_option_to_set_commit_interval.patch patching file fs/btrfs/ctree.h
patching file fs/btrfs/disk-io.c
patching file fs/btrfs/super.c
Hunk #3 succeeded at 647 (offset 19 lines).
Hunk #4 succeeded at 1006 with fuzz 1 (offset 39 lines).
If I am not mistaken, btrfs-next is the entire kernel's code? The wiki suggests running anything compiled therein from the build dir. If I want to compile this into the official 3.10.4 tree, how can I do it?
Quoted 23 lines · Mike Audia
Quoted 10 lines
Quoted 6 lines
Another newbie question is which version of the kernel do I need to have in order to cleanly apply this patch? I am finding that it fails to apply to the current stable kernel code (as of now it is v3.10.4) which makes me think your patch has to be applied to a newer one? Are you patching against the linux git tree meaning I have to use the 3.11 series to try your code?
Try Josef's btrfs-next repo:
OK! I can patch successfully into that git repo:
% cd
/tmp/work
% git clonegit://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git
% cd btrfs
% patch -Np1 -i btrfs_add_mount_option_to_set_commit_interval.patch patching filefs/btrfs/ctree.h
patching filefs/btrfs/disk-io.c
patching filefs/btrfs/super.c
Hunk #3 succeeded at 647 (offset 19 lines).
Hunk #4 succeeded at 1006 with fuzz 1 (offset 39 lines).
Quoted 2 lines
If I am not mistaken, btrfs-next is the entire kernel's code? The wiki suggests running anything compiled therein from the build dir.
That'll be for the userspace tools, not the kernel. Obviously, one
doesn't tend to run kernels from the command line. :)
Quoted 2 lines
If I want to compile this into the official 3.10.4 tree, how can I do it?
Add the "official" kernel repo as a remote to the same git repo
(with git remote add), fetch that repo, create a new branch to work in, based on the btrfs-next branch, then merge in the other branch (or vice-versa).
Note that btrfs-next is usually based on the latest released kernel
anyway, so that's likely to be largely superfluous.
Hugo.
Signature · 3 lines
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
--- A gentleman doesn't do damage unless he's paid for it. --- Quoted 7 lines
Add the "official" kernel repo as a remote to the same git repo (with git remote add), fetch that repo, create a new branch to work in, based on the btrfs-next branch, then merge in the other branch (or vice-versa).
Note that btrfs-next is usually based on the latest released kernel anyway, so that's likely to be largely superfluous.
Thank you for the reply. I am afraid what you've outlined is beyond my abilities. I guess the patch is built against something newer than 3.10.5 which was just released yesterday since I get the similar rejection when patching into it:
patching file fs/btrfs/ctree.h
Hunk #1 succeeded at 1338 (offset -12 lines).
Hunk #2 succeeded at 1929 (offset -40 lines).
patching file fs/btrfs/disk-io.c
Hunk #1 succeeded at 1713 (offset -24 lines).
Hunk #2 FAILED at 1749.
Hunk #3 succeeded at 2172 with fuzz 1 (offset -17 lines).
1 out of 3 hunks FAILED -- saving rejects to file fs/btrfs/disk-io.c.rej patching file fs/btrfs/super.c
Hunk #1 succeeded at 319 (offset -2 lines).
Hunk #2 succeeded at 360 (offset -2 lines).
Hunk #3 succeeded at 626 (offset -2 lines).
Hunk #4 succeeded at 968 (offset 1 line).
Is is safe for me to manually fix that particular hunk?