Bug 746284 - resize2fs: on-line resize always fails when checking on-line resizing support
Summary: resize2fs: on-line resize always fails when checking on-line resizing support
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: e2fsprogs
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Eric Sandeen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-14 15:59 UTC by Lukáš Czerner
Modified: 2011-10-17 19:38 UTC (History)
4 users (show)

Fixed In Version: e2fsprogs-1.42-0.5.WIP.1016.fc17
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-17 19:38:26 UTC
Type: ---


Attachments (Terms of Use)
resize: Do not fail if EXT4_IOC_RESIZE_FS ioctl doesn't exist (1.72 KB, patch)
2011-10-14 16:01 UTC, Lukáš Czerner
no flags Details | Diff

Description Lukáš Czerner 2011-10-14 15:59:33 UTC
Description of problem:

Online resize on ext3/ext4 file systems always fails with the following error message:

 resize2fs: Inappropriate ioctl for device While checking for on-line resizing support


Version-Release number of selected component (if applicable):
resize2fs 1.42-WIP (9-Oct-2011)

How to reproduce:
Attempt to use on-line resize of ext3/ext4 file system.

  
Actual results:
fails

Expected results:
workt

Additional info:

The problem is in the new code added into e2fsptogs to support new on-line resize ioctl(), which should allow resizing >32 bit file systems. However such support does not exist in any released kenrel yet.

Even though the code tries to detect missing ioctl() and fallback to the old on-line resize, it fails to do so due to a bug:


 74 →       if (ioctl(fd, EXT4_IOC_RESIZE_FS, new_size)) {
 75 →       →       if (errno != EINVAL) {
 76 →       →       →       if (errno == EPERM)
 77 →       →       →       →       com_err(program_name, 0,
 78 →       →       →       →       _("Permission denied to resize filesystem"));
 79 →       →       →       else
 80 →       →       →       →       com_err(program_name, errno,
 81 →       →       →       →       _("While checking for on-line resizing "
 82 →       →       →       →         "support"));
 83 →       →       →       exit(1);
 84 →       →       }
 85 →       } else {                                                                                                                                                   
 86 →       →       close(fd);
 87 →       →       return 0;
 88 →       }

Comment 1 Lukáš Czerner 2011-10-14 16:01:36 UTC
Created attachment 528236 [details]
resize: Do not fail if EXT4_IOC_RESIZE_FS ioctl doesn't exist

Patch posted upstream, waiting for review and merge.

Comment 2 Eric Sandeen 2011-10-17 19:38:26 UTC
Fixed upstream and in rawhide now.  Thanks Lukáš!

-Eric


Note You need to log in before you can comment on or make changes to this bug.