all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dietmar Maurer <dietmar@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	 Dominik Csapak <d.csapak@proxmox.com>
Subject: [pbs-devel] applied: [PATCH proxmox-backup] lto/sg_tape/encryption: remove non lto-4 supported byte
Date: Mon, 31 May 2021 12:33:32 +0200 (CEST)	[thread overview]
Message-ID: <912020634.2978.1622457212122@webmail.proxmox.com> (raw)

applied

> On 05/31/2021 10:29 AM Dominik Csapak <d.csapak@proxmox.com> wrote:
> 
>  
> from the SspDataEncryptionCapabilityPage
> 
> it seems we do not need it, since the EXTDECC flag is only used for
> determining if the drive is capable to be configured via
> ADI (Automation/Drive Interface) which we do not use at all.
> 
> this makes the call work with LTO-4 again
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  src/tape/drive/lto/sg_tape/encryption.rs | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
> 
> diff --git a/src/tape/drive/lto/sg_tape/encryption.rs b/src/tape/drive/lto/sg_tape/encryption.rs
> index 7b687f2c..5ce571e4 100644
> --- a/src/tape/drive/lto/sg_tape/encryption.rs
> +++ b/src/tape/drive/lto/sg_tape/encryption.rs
> @@ -195,8 +195,7 @@ struct DataEncryptionStatus {
>  struct SspDataEncryptionCapabilityPage {
>      page_code: u16,
>      page_len: u16,
> -    extdecc_cfgp_byte: u8,
> -    reserved: [u8; 15],
> +    reserved: [u8; 16],
>  }
>  
>  #[derive(Endian)]
> @@ -222,17 +221,7 @@ fn decode_spin_data_encryption_caps(data: &[u8]) -> Result<u8, Error> {
>  
>      proxmox::try_block!({
>          let mut reader = &data[..];
> -        let page: SspDataEncryptionCapabilityPage = unsafe { reader.read_be_value()? };
> -
> -        let extdecc = (page.extdecc_cfgp_byte & 0b00001100) >> 2;
> -        if extdecc != 2 {
> -            bail!("not external data encryption control capable");
> -        }
> -
> -        let cfg_p = page.extdecc_cfgp_byte & 0b00000011;
> -        if cfg_p != 1 {
> -            bail!("not allow to change logical block encryption parameters");
> -        }
> +        let _page: SspDataEncryptionCapabilityPage = unsafe { reader.read_be_value()? };
>  
>          let mut aes_cgm_index = None;
>  
> -- 
> 2.20.1
> 
> 
> 
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel




                 reply	other threads:[~2021-05-31 10:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=912020634.2978.1622457212122@webmail.proxmox.com \
    --to=dietmar@proxmox.com \
    --cc=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal