fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ojaswin Mujoo <ojaswin@linux.ibm.com>
To: fstests@vger.kernel.org, linux-ext4@vger.kernel.org
Cc: Ojaswin Mujoo <ojaswin@linux.ibm.com>, riteshh@linux.ibm.com
Subject: [PATCH 0/2] tests/ext4: Ensure resizes with sparse_super2 are handled correctly
Date: Mon,  7 Feb 2022 13:55:32 +0530	[thread overview]
Message-ID: <cover.1644217569.git.ojaswin@linux.ibm.com> (raw)

As detailed in the patch [1], kernel currently does not support resizes
with sparse_super2 enabled.  Before the above patch, if we used the
EXT4_IOC_RESIZE_FS ioctl directly, wiht sparse_super2 enabled, the
kernel used to still try the resize and ultimatley leave the fs in an
inconsistent state. This also led to corruption and kernel BUGs.

This patchset adds a test for ext4 to ensure that the kernel handles
resizes with sparse_super2 correctly, and returns -EOPNOTSUPP. 

Summary:

Patch 1: Fix the src/ext4_resize.c script to return accurate error codes.
Patch 2: Add the ext4 test for checking resize functionality

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b1489186cc8391e0c1e342f9fbc3eedf6b944c61

Ojaswin Mujoo (2):
  src/ext4_resize.c: Refactor code and ensure accurate errno is returned
  ext4: Test to ensure resize with sparse_super2 is handled correctly

 src/ext4_resize.c  |  46 +++++++++++++-------
 tests/ext4/056     | 102 +++++++++++++++++++++++++++++++++++++++++++++
 tests/ext4/056.out |   2 +
 3 files changed, 136 insertions(+), 14 deletions(-)
 create mode 100755 tests/ext4/056
 create mode 100644 tests/ext4/056.out

-- 
2.27.0


             reply	other threads:[~2022-02-07 10:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07  8:25 Ojaswin Mujoo [this message]
2022-02-07  8:25 ` [PATCH 1/2] src/ext4_resize.c: Refactor code and ensure accurate errno is returned Ojaswin Mujoo
2022-02-19  7:12   ` Ritesh Harjani
2022-02-07  8:25 ` [PATCH 2/2] ext4: Test to ensure resize with sparse_super2 is handled correctly Ojaswin Mujoo
2022-02-19  7:22   ` Ritesh Harjani
2022-02-21  5:41     ` Ojaswin Mujoo
2022-02-20 16:24   ` Eryu Guan
2022-02-21  6:00     ` Ojaswin Mujoo
2022-02-18 10:46 ` [PATCH 0/2] tests/ext4: Ensure resizes with sparse_super2 are " Ojaswin Mujoo

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=cover.1644217569.git.ojaswin@linux.ibm.com \
    --to=ojaswin@linux.ibm.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=riteshh@linux.ibm.com \
    /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).