mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Tong Zhang' <ztong0001@gmail.com>
Cc: Anders Larsen <al@alarsen.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v3] qnx4: qnx4_block_map error handling
Date: Tue, 3 Nov 2020 21:57:32 +0000	[thread overview]
Message-ID: <2e1ec234135349c58993097b84ea10b2@AcuMS.aculab.com> (raw)
In-Reply-To: <CAA5qM4C+UGB_SXW5OeWKPtNkXyVCfwwB_ct9wps0Lj6VhvTawg@mail.gmail.com>

From: Tong Zhang
> Sent: 03 November 2020 13:53
...
> > Also 'blknum' is only 'unsigned long' so ~0ull is wrong.
> > It can be worth injecting an error and checking the error
> > propagation works.
> >
> > What is the actual maximum file size?

> The maximum file size is 2GB-1, but from my understanding
> qnx4_block_map() returns a physical block number.
> The max disk size supported is 2**64 bytes, however
> it is limited to unsigned long (2**32)
> -- so I am actually very hesitant to encode an error code in the return value
> without changing the function return type, which will introduce more
> changes I don't like.
> The original -EIO in qnx4_block_map() is also dodgy btw.

You've put your hand into a bag of worms...

Looks like a load of the 'long' need to be 64bit.

I'm actually surprised how often 'long' appears in the
linux kernel.
I don't believe there was ever a 16bit version (eg 286)
where 'long' was 32bit.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

  reply	other threads:[~2020-11-03 21:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23 21:16 [PATCH] qnx4: do not interpret -EIO as a correct address Tong Zhang
2020-11-02  9:12 ` Anders Larsen
2020-11-02 20:15   ` [PATCH v2] " Tong Zhang
2020-11-02 22:44     ` David Laight
2020-11-02 23:14       ` [PATCH v3] qnx4: qnx4_block_map error handling Tong Zhang
2020-11-03 10:54         ` David Laight
2020-11-03 13:52           ` Tong Zhang
2020-11-03 21:57             ` David Laight [this message]
2020-11-03 22:32               ` Tong Zhang
2020-11-11  1:33                 ` Tong Zhang
2020-11-03 17:35           ` [PATCH v4] " Tong Zhang
2020-11-02 23:17       ` [PATCH v2] qnx4: do not interpret -EIO as a correct address Tong Zhang
2020-11-02 20:17   ` [PATCH] " Tong Zhang

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=2e1ec234135349c58993097b84ea10b2@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=al@alarsen.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ztong0001@gmail.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

Powered by JetHome