Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the Expected Logical Block Application Tag and Reference Tag in nvme copy command #587

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/nvme/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -4640,8 +4640,8 @@ struct nvme_copy_range {
__le16 nlb;
__u8 rsvd18[6];
__le32 eilbrt;
__le16 elbatm;
__le16 elbat;
__le16 elbatm;
};

/**
Expand All @@ -4660,9 +4660,10 @@ struct nvme_copy_range_f1 {
__le64 slba;
__le16 nlb;
__u8 rsvd18[8];
__u8 elbt[10];
__le16 elbatm;
__u64 elbt_l;
__u16 elbt_h;
__le16 elbat;
__le16 elbatm;
};

/**
Expand Down
3 changes: 2 additions & 1 deletion src/nvme/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ void nvme_init_copy_range_f1(struct nvme_copy_range_f1 *copy, __u16 *nlbs,
for (i = 0; i < nr; i++) {
copy[i].nlb = cpu_to_le16(nlbs[i]);
copy[i].slba = cpu_to_le64(slbas[i]);
copy[i].elbt[2] = cpu_to_le64(eilbrts[i]);
copy[i].elbt_l = cpu_to_le64(eilbrts[i]);
copy[i].elbt_h = 0;
copy[i].elbatm = cpu_to_le16(elbatms[i]);
copy[i].elbat = cpu_to_le16(elbats[i]);
}
Expand Down