public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* loopdev regression with v2.23
@ 2013-05-11 23:39 Dave Reisner
  2013-05-13  9:07 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Reisner @ 2013-05-11 23:39 UTC (permalink / raw)
  To: util-linux

Hi,

I have a bug report that points out that v2.23 has disallowed losetup of
a block device with an offset:

https://bugs.archlinux.org/task/35193

As I also note in the bug report, I've bisected this to commit 293714c0d15.

I'm not clear on what the proper fix is here -- "expected_size" is set
to 0 since the fstat call is performed on a special file which has a 0
size. Is the right thing to do simply return 0 if the size of the
"backing file" is 0?

There's also the problem of the error message -- the fabricated ERANGE
return fails to also set errno=ERANGE before returning.

Cheers,
Dave

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: loopdev regression with v2.23
  2013-05-11 23:39 loopdev regression with v2.23 Dave Reisner
@ 2013-05-13  9:07 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2013-05-13  9:07 UTC (permalink / raw)
  To: util-linux; +Cc: Jeff Mahoney

On Sat, May 11, 2013 at 07:39:10PM -0400, Dave Reisner wrote:
> I have a bug report that points out that v2.23 has disallowed losetup of
> a block device with an offset:
> 
> https://bugs.archlinux.org/task/35193
> 
> As I also note in the bug report, I've bisected this to commit 293714c0d15.
> 
> I'm not clear on what the proper fix is here -- "expected_size" is set
> to 0 since the fstat call is performed on a special file which has a 0
> size. Is the right thing to do simply return 0 if the size of the
> "backing file" is 0?

The right thing is to use size of the block device if the backing file
is a block device. Fixed. Git pull.

All this is workaround for kernel bug (already fixed in v3.9). I hope
that one day we will use KERNEL_VERSION macro to exclude all this
painful thing :-)

Thanks!

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-13  9:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-11 23:39 loopdev regression with v2.23 Dave Reisner
2013-05-13  9:07 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox