[PATCH] Btrfs: Cocci spatch ptr_ret.spatch
Signed-off-by: Thomas Meyer tho...@m3y3r.de --- diff -u -p a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -3296,10 +3296,7 @@ int btrfs_resume_balance_async(struct bt } tsk = kthread_run(balance_kthread, fs_info, btrfs-balance); - if (IS_ERR(tsk)) - return PTR_ERR(tsk); - - return 0; + return PTR_RET(tsk); } int btrfs_recover_balance(struct btrfs_fs_info *fs_info) -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Btrfs: Cocci spatch memdup.spatch
Signed-off-by: Thomas Meyer tho...@m3y3r.de --- diff -u -p a/fs/btrfs/send.c b/fs/btrfs/send.c --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -3429,10 +3429,9 @@ static int __find_xattr(int num, struct strncmp(name, ctx-name, name_len) == 0) { ctx-found_idx = num; ctx-found_data_len = data_len; - ctx-found_data = kmalloc(data_len, GFP_NOFS); + ctx-found_data = kmemdup(data, data_len, GFP_NOFS); if (!ctx-found_data) return -ENOMEM; - memcpy(ctx-found_data, data, data_len); return 1; } return 0; -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RADI6 questions
Hi List, I have a filesystem that is spanning about 10 devices. It is currently using RAID1 for both data and metadata. In order to get higher availability and be able to handle multi device failures I would like to change from RAID1 to RAID6. Is it possible/stable/supported/recommended to change data from RAID1 to RAID6 ? (I assume btrfs fi balance ... is used for this?) Metadata is currently RAID1, is it supported to put metadata as RAID6 too? It would be odd to have lesser protection for metadata than data. Optimally I would like a mode where metadata is mirrored onto all the spindles in the filesystem, not just 2 in RAID1 or n in RAID6. Im running a 3.8.0 kernel. regards ronnie sahlberg -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: RADI6 questions
On Sat, Jun 01, 2013 at 02:07:53PM -0700, ronnie sahlberg wrote: Hi List, I have a filesystem that is spanning about 10 devices. It is currently using RAID1 for both data and metadata. In order to get higher availability and be able to handle multi device failures I would like to change from RAID1 to RAID6. Is it possible/stable/supported/recommended to change data from RAID1 to RAID6 ? (I assume btrfs fi balance ... is used for this?) Yes. Metadata is currently RAID1, is it supported to put metadata as RAID6 too? It would be odd to have lesser protection for metadata than data. Optimally I would like a mode where metadata is mirrored onto all the spindles in the filesystem, not just 2 in RAID1 or n in RAID6. Yes, that should be supported. Im running a 3.8.0 kernel. The btrfs RAID-5 and RAID-6 implementations aren't really ready for production use, so right now I wouldn't recommend using them for anything other than for testing purposes with data that's replacable. Hugo. -- === 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 --- w.w.w. : England's batting scorecard --- signature.asc Description: Digital signature