fs_info->throttles = 0;
fs_info->mount_opt = 0;
fs_info->max_extent = (u64)-1;
+ fs_info->max_inline = 8192 * 1024;
fs_info->delalloc_bytes = 0;
fs_info->btree_inode = new_inode(sb);
fs_info->btree_inode->i_ino = 1;
*/
inline_size = end_pos;
if (isize >= BTRFS_MAX_INLINE_DATA_SIZE(root) ||
- inline_size > 8192 ||
+ inline_size > root->fs_info->max_inline ||
+ (inline_size & (root->sectorsize -1)) == 0 ||
inline_size >= BTRFS_MAX_INLINE_DATA_SIZE(root)) {
u64 last_end;
u64 existing_delalloc = 0;
enum {
Opt_subvol, Opt_nodatasum, Opt_nodatacow, Opt_max_extent,
- Opt_alloc_start, Opt_nobarrier, Opt_ssd, Opt_err,
+ Opt_max_inline, Opt_alloc_start, Opt_nobarrier, Opt_ssd, Opt_err,
};
static match_table_t tokens = {
{Opt_nodatacow, "nodatacow"},
{Opt_nobarrier, "nobarrier"},
{Opt_max_extent, "max_extent=%s"},
+ {Opt_max_inline, "max_inline=%s"},
{Opt_alloc_start, "alloc_start=%s"},
{Opt_ssd, "ssd"},
{Opt_err, NULL}
}
}
break;
+ case Opt_max_inline:
+ if (info) {
+ char *num = match_strdup(&args[0]);
+ if (num) {
+ info->max_inline =
+ btrfs_parse_size(num);
+ kfree(num);
+
+ info->max_inline = max_t(u64,
+ info->max_inline,
+ root->sectorsize);
+ printk("btrfs: max_inline at %Lu\n",
+ info->max_inline);
+ }
+ }
+ break;
case Opt_alloc_start:
if (info) {
char *num = match_strdup(&args[0]);