diff mbox

mke2fs: skip alignment questioning if -F specified

Message ID 4B8C1B25.5050006@redhat.com
State Accepted, archived
Headers show

Commit Message

Eric Sandeen March 1, 2010, 7:53 p.m. UTC
RH bug 569021 - mke2fs insists on user interaction even if stdin is not a tty and -F is passed

This is just a warning, -F should easily override it.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---


--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Theodore Ts'o March 12, 2010, 2:48 a.m. UTC | #1
On Mon, Mar 01, 2010 at 01:53:09PM -0600, Eric Sandeen wrote:
> RH bug 569021 - mke2fs insists on user interaction even if stdin is not a tty and -F is passed
> 
> This is just a warning, -F should easily override it.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Applied to the maint branch.

				- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Andreas Dilger March 12, 2010, 7:54 a.m. UTC | #2
On 2010-03-11, at 19:48, tytso@mit.edu wrote:
> On Mon, Mar 01, 2010 at 01:53:09PM -0600, Eric Sandeen wrote:
>> RH bug 569021 - mke2fs insists on user interaction even if stdin is  
>> not a tty and -F is passed
>>
>> This is just a warning, -F should easily override it.

Since this is just a warning, do we really need to have "-F" at all?   
I dislike requiring "-F" on common actions, because it means that it  
will commonly be used, but may accidentally override some unintended  
problem.

We've lived without block device alignment until now, and it seems  
somewhat unpleasant that mke2fs may start failing (if -F is not given)  
for situations where it previously worked just fine.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Eric Sandeen March 12, 2010, 3:17 p.m. UTC | #3
Andreas Dilger wrote:
> On 2010-03-11, at 19:48, tytso@mit.edu wrote:
>> On Mon, Mar 01, 2010 at 01:53:09PM -0600, Eric Sandeen wrote:
>>> RH bug 569021 - mke2fs insists on user interaction even if stdin is
>>> not a tty and -F is passed
>>>
>>> This is just a warning, -F should easily override it.
> 
> Since this is just a warning, do we really need to have "-F" at all?  I
> dislike requiring "-F" on common actions, because it means that it will
> commonly be used, but may accidentally override some unintended problem.
> 
> We've lived without block device alignment until now, and it seems
> somewhat unpleasant that mke2fs may start failing (if -F is not given)
> for situations where it previously worked just fine.

Well, that's a good point, dropping the -F requirement is fine with me too,
I guess.

Ted do you want to just toss in:

-		if (!force)
-			proceed_question();

?  I can send a patch but it may take longer for you to extract it from email ;)

-Eric

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o March 12, 2010, 3:40 p.m. UTC | #4
On Mar 12, 2010, at 10:17 AM, Eric Sandeen wrote:

> Andreas Dilger wrote:
>> On 2010-03-11, at 19:48, tytso@mit.edu wrote:
>>> On Mon, Mar 01, 2010 at 01:53:09PM -0600, Eric Sandeen wrote:
>>>> RH bug 569021 - mke2fs insists on user interaction even if stdin is
>>>> not a tty and -F is passed
>>>> 
>>>> This is just a warning, -F should easily override it.
>> 
>> Since this is just a warning, do we really need to have "-F" at all?  I
>> dislike requiring "-F" on common actions, because it means that it will
>> commonly be used, but may accidentally override some unintended problem.
>> 
>> We've lived without block device alignment until now, and it seems
>> somewhat unpleasant that mke2fs may start failing (if -F is not given)
>> for situations where it previously worked just fine.
> 
> Well, that's a good point, dropping the -F requirement is fine with me too,
> I guess.
> 
> Ted do you want to just toss in:
> 
> -		if (!force)
> -			proceed_question();


Yeah, I'll just make the change on my end.


-- Ted

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 4b13367..2a23bf7 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1643,7 +1643,8 @@  got_size:
 		       device_name, retval);
 		printf(_("This may result in very poor performance, "
 			  "(re)-partitioning suggested.\n"));
-		proceed_question();
+		if (!force)
+			proceed_question();
 	}
 #endif