Displaying 7 results from an estimated 7 matches for "btrfs_parse_early_opt".
2011 Sep 13
5
[PATCH] btrfs: trivial fix, a potential memory leak in btrfs_parse_early_options()
...igned-off-by: Jie Liu <jeff.liu@oracle.com>
---
fs/btrfs/super.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 15634d4..16f31e1 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -406,7 +406,7 @@ static int btrfs_parse_early_options(const char
*options, fmode_t flags,
u64 *subvol_rootid, struct btrfs_fs_devices **fs_devices)
{
substring_t args[MAX_OPT_ARGS];
- char *opts, *orig, *p;
+ char *device_name, *opts, *orig, *p;
int error = 0;
int intarg;
@@ -457,8 +457,14 @@ static int btrfs_...
2008 Jun 10
1
[PATCH, RFC] btrfs: allow scanning multiple devices during mount
...;nodatasum"},
{Opt_nodatacow, "nodatacow"},
{Opt_nobarrier, "nobarrier"},
@@ -142,8 +143,9 @@ int btrfs_parse_options(struct btrfs_roo
btrfs_set_opt(info->mount_opt, DEGRADED);
break;
case Opt_subvol:
+ case Opt_device:
/*
- * This one is parsed by btrfs_parse_early_options
+ * These are parsed by btrfs_parse_early_options
* and can be happily ignored here.
*/
break;
@@ -212,8 +214,9 @@ int btrfs_parse_options(struct btrfs_roo
* All other options will be parsed on much later in the mount process and
* only when we need to allocate a new super...
2011 Apr 06
3
[PATCH V2] Btrfs: fix subvolume mount by name problem when default mount subvolume is set
...uot;},
+ {Opt_subvolrootid, "subvolrootid=%d"},
{Opt_err, NULL},
};
@@ -229,6 +230,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
break;
case Opt_subvol:
case Opt_subvolid:
+ case Opt_subvolrootid:
case Opt_device:
/*
* These are parsed by btrfs_parse_early_options
@@ -385,7 +387,7 @@ out:
*/
static int btrfs_parse_early_options(const char *options, fmode_t flags,
void *holder, char **subvol_name, u64 *subvol_objectid,
- struct btrfs_fs_devices **fs_devices)
+ u64 *subvol_rootid, struct btrfs_fs_devices **fs_devices)
{
substring_t args[MAX_OPT_...
2011 Nov 09
6
[PATCH 0/5] Btrfs: mount error handling fixes
A bunch of fixes (memory leaks, NULL pointer dereferences and devices
hanging in busy state) to sanitize error handling during mount sequence.
This is on top of for-linus + slyfox''s double-free fix.
Thanks,
Ilya
Ilya Dryomov (5):
Btrfs: fix memory leak in btrfs_parse_early_options()
Btrfs: fix subvol_name leak on error in btrfs_mount()
Btrfs: avoid null dereference and leaks when bailing from
open_ctree()
Btrfs: close devices on all error paths in open_ctree()
Btrfs: rework error handling in btrfs_mount()
fs/btrfs/disk-io.c | 42 ++++++++++++++++++--------...
2013 Jul 24
0
[PATCH RESEND 2/3] Btrfs: use u64 for subvolid when parsing mount options
...uot;degraded"},
{Opt_subvol, "subvol=%s"},
- {Opt_subvolid, "subvolid=%d"},
+ {Opt_subvolid, "subvolid=%s"},
{Opt_device, "device=%s"},
{Opt_nodatasum, "nodatasum"},
{Opt_nodatacow, "nodatacow"},
@@ -673,8 +673,8 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags,
{
substring_t args[MAX_OPT_ARGS];
char *device_name, *opts, *orig, *p;
+ char *num = NULL;
int error = 0;
- int intarg;
if (!options)
return 0;
@@ -704,16 +704,14 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags,
}...
2009 Dec 14
0
[PATCH] Btrfs: make subvol=0 mount the original default root
...gned-off-by: Josef Bacik <josef@redhat.com>
---
fs/btrfs/super.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index bcbdc1b..ccc0380 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -305,9 +305,15 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags,
switch (token) {
case Opt_subvol:
intarg = 0;
- match_int(&args[0], &intarg);
- if (intarg)
- *subvol_objectid = intarg;
+ error = match_int(&args[0], &intarg);
+ if (!error) {
+ /* we want the original fs_tree */
+...
2013 Oct 05
10
Linux Arch: kernel BUG at fs/btrfs/inode.c:873!
...<ffffffff81279e33>] call_rwsem_down_write_failed+0x13/0x20
[ 828.086717] [<ffffffff814c5ec4>] ? down_write+0x24/0x26
[ 828.088366] [<ffffffff8118dffe>] grab_super+0x2e/0xa0
[ 828.090021] [<ffffffff8118e6f0>] sget+0x320/0x580
[ 828.091677] [<ffffffffa043e130>] ?
btrfs_parse_early_options+0x190/0x190 [btrfs]
[ 828.093368] [<ffffffff814c57ae>] ? mutex_unlock+0xe/0x10
[ 828.095068] [<ffffffffa043f228>] btrfs_mount+0x408/0x830 [btrfs]
[ 828.096786] [<ffffffff81141cd2>] ? pcpu_alloc+0x7d2/0x9e0
[ 828.098516] [<ffffffff8118f5d9>] mount_fs+0x39/0x1b0
[...