Bug 106861 - DPOFUA should not be related to WCE / Caching mode page
Summary: DPOFUA should not be related to WCE / Caching mode page
Status: NEW
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: SCSI (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: linux-scsi@vger.kernel.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-29 08:14 UTC by Tom Yan
Modified: 2015-10-29 08:15 UTC (History)
0 users

See Also:
Kernel Version: 4.2.4
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Tom Yan 2015-10-29 08:14:51 UTC
The sd driver checks whether the device supports DPO/FUA and reports it to the FUA readonly attribute. However, they are somehow "depended" on the Caching mode page and WCE (sd.c).

The fact is, the DPOFUA bit just isn't part of the Caching mode page. Instead it is reported in DEVICE-SPECIFIC PARAMETER of mode parameter header.

Moreover, I don't see what impact does WCE have on DPO/FUA as per SBC or SAT. As long as it is implemented correctly, DPO/FUA should be completely fine on drives without write cache as well.

So IMHO how the kernel handles the checking and reporting simply has logical mistake.
Comment 1 Tom Yan 2015-10-29 08:15:26 UTC
Example drive:

[tom@localhost ~]$ sudo sdparm --long /dev/sdc
    /dev/sdc: WD        My Passport 083A  1065
    Direct access device specific parameters: WP=0  DPOFUA=1
Control [co] mode page:
  SWP         0  [cha: n, def:  0, sav:  0]  Software write protect
[tom@localhost ~]$ sudo sdparm -a --long /dev/sdc
    /dev/sdc: WD        My Passport 083A  1065
    Direct access device specific parameters: WP=0  DPOFUA=1
Control [co] mode page:
  TST         0  [cha: n, def:  0, sav:  0]  Task set type
  TMF_ONLY    0  [cha: n, def:  0, sav:  0]  Task management functions only
  DPICZ       0  [cha: n, def:  0, sav:  0]  Disable protection information check if protect field zero
  D_SENSE     0  [cha: n, def:  0, sav:  0]  Descriptor format sense data
  GLTSD       0  [cha: n, def:  0, sav:  0]  Global logging target save disable
  RLEC        0  [cha: n, def:  0, sav:  0]  Report log exception condition
  QAM         1  [cha: n, def:  1, sav:  1]  Queue algorithm modifier
  NUAR        0  [cha: n, def:  0, sav:  0]  No unit attention on release
  QERR        0  [cha: n, def:  0, sav:  0]  Queue error management
  RAC         0  [cha: n, def:  0, sav:  0]  Report a check
  UA_INTLCK   0  [cha: n, def:  0, sav:  0]  Unit attention interlocks control
  SWP         0  [cha: n, def:  0, sav:  0]  Software write protect
  ATO         0  [cha: n, def:  0, sav:  0]  Application tag owner
  TAS         0  [cha: n, def:  0, sav:  0]  Task aborted status
  ATMPE       0  [cha: n, def:  0, sav:  0]  Application tag mode page enabled
  RWWP        0  [cha: n, def:  0, sav:  0]  Reject write without protection
  AUTOLOAD    0  [cha: n, def:  0, sav:  0]  Autoload mode
  BTP         0  [cha: n, def:  0, sav:  0]  Busy timeout period (100us)
  ESTCT       0  [cha: n, def:  0, sav:  0]  Extended self test completion time (sec)
Power condition [po] mode page:
  PM_BG       0  [cha: n, def:  0, sav:  0]  Power management, background functions, precedence
  STANDBY_Y   0  [cha: n, def:  0, sav:  0]  Standby_y timer enable
  IDLE_C      0  [cha: n, def:  0, sav:  0]  Idle_c timer enable
  IDLE_B      0  [cha: n, def:  0, sav:  0]  Idle_b timer enable
  IDLE        0  [cha: n, def:  0, sav:  0]  Idle_a timer enable
  STANDBY     1  [cha: y, def:  1, sav:  1]  Standby_z timer enable
  ICT         0  [cha: n, def:  0, sav:  0]  Idle_a condition timer (100 ms)
  SCT       18000  [cha: y, def:18000, sav:18000]  Standby_z condition timer (100 ms)
  IBCT        0  [cha: n, def:  0, sav:  0]  Idle_b condition timer (100 ms)
  ICCT        0  [cha: n, def:  0, sav:  0]  Idle_c condition timer (100 ms)
  SYCT        0  [cha: n, def:  0, sav:  0]  Standby_y condition timer (100 ms)
  CCF_IDLE    0  [cha: n, def:  0, sav:  0]  check condition on transition from idle
  CCF_STAND   0  [cha: n, def:  0, sav:  0]  check condition on transition from standby
  CCF_STOPP   0  [cha: n, def:  0, sav:  0]  check condition on transition from stopped

Note You need to log in before you can comment on or make changes to this bug.