linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: dsterba@suse.cz
Subject: [PATCH v2 1/7] btrfs-progs: convert/ext2: Fix inline extent creation check
Date: Tue, 13 Mar 2018 09:56:10 +0800	[thread overview]
Message-ID: <20180313015616.6574-2-wqu@suse.com> (raw)
In-Reply-To: <20180313015616.6574-1-wqu@suse.com>

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 convert/source-ext2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/convert/source-ext2.c b/convert/source-ext2.c
index b1492c78693d..e13fbe00415a 100644
--- a/convert/source-ext2.c
+++ b/convert/source-ext2.c
@@ -310,7 +310,7 @@ static int ext2_create_file_extents(struct btrfs_trans_handle *trans,
 	if (ret)
 		goto fail;
 	if ((convert_flags & CONVERT_FLAG_INLINE_DATA) && data.first_block == 0
-	    && data.num_blocks > 0
+	    && data.num_blocks > 0 && inode_size < sectorsize
 	    && inode_size <= BTRFS_MAX_INLINE_DATA_SIZE(root->fs_info)) {
 		u64 num_bytes = data.num_blocks * sectorsize;
 		u64 disk_bytenr = data.disk_block * sectorsize;
-- 
2.16.2


  reply	other threads:[~2018-03-13  1:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-13  1:56 [PATCH v2 0/7] Fix long standing -EOPNOTSUPP problem caused by large inline extent Qu Wenruo
2018-03-13  1:56 ` Qu Wenruo [this message]
2018-03-19 13:20   ` [PATCH v2 1/7] btrfs-progs: convert/ext2: Fix inline extent creation check David Sterba
2018-03-13  1:56 ` [PATCH v2 2/7] btrfs-progs: convert/reiserfs: Fix inline file " Qu Wenruo
2018-03-13  1:56 ` [PATCH v2 3/7] btrfs-progs: mkfs/rootdir: Fix inline " Qu Wenruo
2018-03-13  1:56 ` [PATCH v2 4/7] btrfs-progs: check/original mode: Check inline extent size Qu Wenruo
2018-03-13  8:40   ` Nikolay Borisov
2018-03-13  9:06     ` Qu Wenruo
2018-03-13  1:56 ` [PATCH v2 5/7] btrfs-progs: check/lowmem " Qu Wenruo
2018-03-13  8:39   ` Nikolay Borisov
2018-03-13  9:04     ` Qu Wenruo
2018-03-13  1:56 ` [PATCH v2 6/7] btrfs-progs: test/convert: Add test case for invalid large inline data extent Qu Wenruo
2018-03-13  1:56 ` [PATCH v2 7/7] btrfs-progs: test/mkfs: Add test case for rootdir inline extent size Qu Wenruo
2018-03-19 13:25   ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180313015616.6574-2-wqu@suse.com \
    --to=wqu@suse.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).