Skip to content

Commit

Permalink
dev_jmb39x_raid.cpp: Enhance LBA range from 33-62 to 1-255 (#1594).
Browse files Browse the repository at this point in the history
smartctl.8.in: Update related documentation.

git-svn-id: https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools@5366 4ea69e1a-61f1-4043-bf83-b5c94c648137
  • Loading branch information
chrfranke committed Apr 30, 2022
1 parent 0e052b1 commit 020d996
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
$Id$

2022-04-30 Christian Franke <[email protected]>

dev_jmb39x_raid.cpp: Enhance LBA range from 33-62 to 1-255 (#1594).
smartctl.8.in: Update related documentation.

2022-04-27 Gabriele Pohl <[email protected]>

drivedb.h:
Expand Down
6 changes: 3 additions & 3 deletions dev_jmb39x_raid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Home page of code is: https://www.smartmontools.org
*
* Copyright (C) 2019-21 Christian Franke
* Copyright (C) 2019-22 Christian Franke
*
* Based on JMraidcon (same license):
* Copyright (C) 2010 Werner Johansson
Expand Down Expand Up @@ -729,8 +729,8 @@ ata_device * smart_interface::get_jmb39x_device(const char * type, smart_device
force = true;
n1 += n2;
}
if (!(n1 == len && port <= 4 && 33 <= lba && lba <= 62)) {
set_err(EINVAL, "Option -d %s,N[,sLBA][,force] must have 0 <= N <= 4 [, 33 <= LBA <= 62]", prefix);
if (!(n1 == len && port <= 4 && 1 <= lba && lba <= 255)) {
set_err(EINVAL, "Option -d %s,N[,sLBA][,force] must have 0 <= N <= 4 [, 1 <= LBA <= 255]", prefix);
return 0;
}

Expand Down
12 changes: 9 additions & 3 deletions smartctl.8.in
Original file line number Diff line number Diff line change
Expand Up @@ -729,11 +729,17 @@ some QNAP NAS devices.
The integer N is the port number from 0 to 4.
.br
\fBWARNING: The ATA pass-through commands are issued via READ/WRITE commands
to LBA 33 of the RAID volume.
to a LBA of the RAID volume.
Using this option with other devices may overwrite this sector.\fP
.br
The LBA could be selected in the range 33 (last sector of a GPT) to 62 (last
sector of traditional boot area).
The default LBA is 33.
The LBA could be selected in the range from 1 to 255 inclusive.
.br
If a GPT partition table is used, LBA 33 contains the last 4 (of 128)
entries of the partition table.
These entries are zero filled in most cases.
If a MBR partition table is used, LBA 33 may be zero filled or may contain
code from a boot loader.
.br
By default, access to the device is refused if the selected sector is not
zero filled.
Expand Down

0 comments on commit 020d996

Please sign in to comment.