Do not update "saved" mode page on every MODE SELECT.

We do not have non-volatile memory to really save those values, so we
neither report nor support this capability.  Also saved mode pages are
not replicated between HA peers now.

MFC after:	2 weeks
This commit is contained in:
Alexander Motin 2016-12-27 22:38:44 +00:00
parent d786719d90
commit ca734d8a13

View File

@ -5833,7 +5833,7 @@ ctl_default_page_handler(struct ctl_scsiio *ctsio,
struct ctl_page_index *page_index, uint8_t *page_ptr)
{
struct ctl_lun *lun;
uint8_t *current_cp, *saved_cp;
uint8_t *current_cp;
int set_ua;
uint32_t initidx;
@ -5843,13 +5843,10 @@ ctl_default_page_handler(struct ctl_scsiio *ctsio,
current_cp = (page_index->page_data + (page_index->page_len *
CTL_PAGE_CURRENT));
saved_cp = (page_index->page_data + (page_index->page_len *
CTL_PAGE_SAVED));
mtx_lock(&lun->lun_lock);
if (memcmp(current_cp, page_ptr, page_index->page_len)) {
memcpy(current_cp, page_ptr, page_index->page_len);
memcpy(saved_cp, page_ptr, page_index->page_len);
set_ua = 1;
}
if (set_ua != 0)