mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	btrfs: deprecate subvolrootid mount option
This mount option was a workaround when subvol= assumed path relative to the default subvolume, not the toplevel one. This was fixed long time ago and subvolrootid has no effect. Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
This commit is contained in:
		
							parent
							
								
									c2cf52eb71
								
							
						
					
					
						commit
						5e2a4b25da
					
				
					 1 changed files with 4 additions and 13 deletions
				
			
		| 
						 | 
					@ -643,7 +643,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static int btrfs_parse_early_options(const char *options, fmode_t flags,
 | 
					static int btrfs_parse_early_options(const char *options, fmode_t flags,
 | 
				
			||||||
		void *holder, char **subvol_name, u64 *subvol_objectid,
 | 
							void *holder, char **subvol_name, u64 *subvol_objectid,
 | 
				
			||||||
		u64 *subvol_rootid, struct btrfs_fs_devices **fs_devices)
 | 
							struct btrfs_fs_devices **fs_devices)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	substring_t args[MAX_OPT_ARGS];
 | 
						substring_t args[MAX_OPT_ARGS];
 | 
				
			||||||
	char *device_name, *opts, *orig, *p;
 | 
						char *device_name, *opts, *orig, *p;
 | 
				
			||||||
| 
						 | 
					@ -686,16 +686,8 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags,
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		case Opt_subvolrootid:
 | 
							case Opt_subvolrootid:
 | 
				
			||||||
			intarg = 0;
 | 
								printk(KERN_WARNING
 | 
				
			||||||
			error = match_int(&args[0], &intarg);
 | 
									"btrfs: 'subvolrootid' mount option is deprecated and has no effect\n");
 | 
				
			||||||
			if (!error) {
 | 
					 | 
				
			||||||
				/* we want the original fs_tree */
 | 
					 | 
				
			||||||
				if (!intarg)
 | 
					 | 
				
			||||||
					*subvol_rootid =
 | 
					 | 
				
			||||||
						BTRFS_FS_TREE_OBJECTID;
 | 
					 | 
				
			||||||
				else
 | 
					 | 
				
			||||||
					*subvol_rootid = intarg;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		case Opt_device:
 | 
							case Opt_device:
 | 
				
			||||||
			device_name = match_strdup(&args[0]);
 | 
								device_name = match_strdup(&args[0]);
 | 
				
			||||||
| 
						 | 
					@ -1073,7 +1065,6 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
 | 
				
			||||||
	fmode_t mode = FMODE_READ;
 | 
						fmode_t mode = FMODE_READ;
 | 
				
			||||||
	char *subvol_name = NULL;
 | 
						char *subvol_name = NULL;
 | 
				
			||||||
	u64 subvol_objectid = 0;
 | 
						u64 subvol_objectid = 0;
 | 
				
			||||||
	u64 subvol_rootid = 0;
 | 
					 | 
				
			||||||
	int error = 0;
 | 
						int error = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!(flags & MS_RDONLY))
 | 
						if (!(flags & MS_RDONLY))
 | 
				
			||||||
| 
						 | 
					@ -1081,7 +1072,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	error = btrfs_parse_early_options(data, mode, fs_type,
 | 
						error = btrfs_parse_early_options(data, mode, fs_type,
 | 
				
			||||||
					  &subvol_name, &subvol_objectid,
 | 
										  &subvol_name, &subvol_objectid,
 | 
				
			||||||
					  &subvol_rootid, &fs_devices);
 | 
										  &fs_devices);
 | 
				
			||||||
	if (error) {
 | 
						if (error) {
 | 
				
			||||||
		kfree(subvol_name);
 | 
							kfree(subvol_name);
 | 
				
			||||||
		return ERR_PTR(error);
 | 
							return ERR_PTR(error);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue