RDMA/rxe: Allow registering persistent flag for pmem MR only
authorLi Zhijian <lizhijian@fujitsu.com>
Tue, 6 Dec 2022 13:01:55 +0000 (21:01 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 9 Dec 2022 23:36:02 +0000 (19:36 -0400)
commit02ea0a511558c907bde0e01fdebcd4536924d996
tree72674005929259bfd892f4fdde9e6d82874515b3
parent668ce52d5eef477c0def757610768a1a3ccc9785
RDMA/rxe: Allow registering persistent flag for pmem MR only

Memory region could  support at most 2 flush access flags:
IB_ACCESS_FLUSH_PERSISTENT and IB_ACCESS_FLUSH_GLOBAL

But we only allow user to register persistent flush flags to the pmem MR
where it has the ability of persisting data across power cycles.

So registering a persistent access flag to a non-pmem MR will be rejected.

Link: https://lore.kernel.org/r/20221206130201.30986-5-lizhijian@fujitsu.com
CC: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_mr.c