Re: [PATCH 3/3] st.ko: change enlarge_buffer result

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2.12.2013, at 21.00, Bodo Stroesser <bstroesser@xxxxxxxxxxxxxx> wrote:

> From: Bodo Stroesser <bstroesser@xxxxxxxxxxxxxx>
> Date: Mon, 2 Dec 2013 18:52:10 +0100
> Subject: [PATCH 3/3] st.ko: change enlarge_buffer result
> 
> enlarge_buffer() just returns 1 or 0 if it could or could
> not allocate the requested buffer.
> 
> In case of result 0, the callers always set the error to
> EOVERFLOW. I think, this is not a good errno for those
> cases, where enlarge_buffer() could not allocate the pages
> it needed.
> 
> So I changed enlarge_buffer() to return a meaningful
> result (-ENOMEM or -EOVERFLOW in case of error, 0 in case of
> success) and the callers to use this result.
> 
ENOMEM is used for telling the user that, in variable block mode, the byte count in read() is smaller than the next block. This may not sound like proper use of this code but this is how the tape drivers have done. When ENOMEM is not used, the patch would be only cosmetic.

Thanks,
Kai

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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux