tags 360652 +pending
thanks

On Mon, Apr 03, 2006 at 10:19:05PM +0200, Michael Prokop wrote:
> While older versions of mkfs.ext3 worked without any problems
> running mkfs.ext3 with the new version fails.

Oops, thanks for pointing this out.  The following patch will fix
things up.

                                        - Ted

# HG changeset patch
# User [EMAIL PROTECTED]
# Node ID 1bfd437f2f618fe407d8052bbf654204a569919b
# Parent  5fcba7289787d4304d65bdc9aedb6fe7b627cf2d
Fix ext2fs_add_journal_inode() when filesystem is opened in exclusive mode

If the filesystem is opened in exclusive mode, then device will be
busy by definition, so don't return -EBUSY.  This caused mke2fs -j to
fail on the 1.39-WIP (29-Mar-2006) release.  (Addresses Debian Bug:
#360652)

Signed-off-by: "Theodore Ts'o" <[EMAIL PROTECTED]>

diff -r 5fcba7289787 -r 1bfd437f2f61 lib/ext2fs/ChangeLog
--- a/lib/ext2fs/ChangeLog      Sun Apr  2 10:04:36 2006 -0400
+++ b/lib/ext2fs/ChangeLog      Tue Apr  4 19:23:41 2006 -0400
@@ -1,3 +1,11 @@
+2006-04-04  Theodore Ts'o  <[EMAIL PROTECTED]>
+
+       * mkjournal.c (ext2fs_add_journal_inode): If the filesystem is
+               opened in exclusive mode, then device will be busy by
+               definition, so don't return -EBUSY.  This caused mke2fs -j
+               to fail on the 1.39-WIP (29-Mar-2006) release.  (Addresses
+               Debian Bug: #360652)
+
 2006-03-29  Theodore Ts'o  <[EMAIL PROTECTED]>
 
        * bitops.h (ext2fs_set_bit, ext2fs_clear_bit): Fix the constraints
diff -r 5fcba7289787 -r 1bfd437f2f61 lib/ext2fs/mkjournal.c
--- a/lib/ext2fs/mkjournal.c    Sun Apr  2 10:04:36 2006 -0400
+++ b/lib/ext2fs/mkjournal.c    Tue Apr  4 19:23:41 2006 -0400
@@ -370,7 +370,8 @@
                close(fd);
                journal_ino = st.st_ino;
        } else {
-               if (mount_flags & EXT2_MF_BUSY) {
+               if ((mount_flags & EXT2_MF_BUSY) &&
+                   !(fs->flags & EXT2_FLAG_EXCLUSIVE)) {
                        retval = EBUSY;
                        goto errout;
                }


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to