The autolabel feature tries to enable labels whenever a namespace in a
label-less mode region is reconfigured. It builds on the assumption that
if the entire capacity is being reconfigured then the operation can try
to assume exclusive ownership of all the DIMMs in that region.
However, if a
Perform a ndctl_namespace_disable_safe loop to disable a region to make
sure we are not ripping out a namespace from underneath an actively
mounted filesystem.
Signed-off-by: Dan Williams
---
ndctl/action.h| 15 +++
ndctl/namespace.c | 15
When 'destroy-namespace' or 'create-namespace --reconfig' operations
encounter a namespace that is mounted, the operation will always fail.
The '--force' option only forces continuation when the namespace is
active and not mounted. If the namespace is mounted then even --force
will fail.
The 'access_permitted' helper is used in the gup-fast path and goes
beyond the simple _PAGE_RW check to also:
* validate that the mapping is writable from a protection keys
standpoint
* validate that the pte has _PAGE_USER set since all fault paths where
pte_write is must be referencing
The 'access_permitted' helper is used in the gup-fast path and goes
beyond the simple _PAGE_RW check to also:
* validate that the mapping is writable from a protection keys
standpoint
* validate that the pte has _PAGE_USER set since all fault paths where
pmd_write is must be referencing
The 'access_permitted' helper is used in the gup-fast path and goes
beyond the simple _PAGE_RW check to also:
* validate that the mapping is writable from a protection keys
standpoint
* validate that the pte has _PAGE_USER set since all fault paths where
pud_write is must be referencing
Changes since v1 [1]:
* fix arm64 compilation, add __HAVE_ARCH_PUD_WRITE
* fix sparc64 compilation, add __HAVE_ARCH_PUD_WRITE
* fix s390 compilation, add a pud_write() helper
---
Andrew,
Here is a third version to the pud_write() fix [2], and some follow-on
patches to use the
Currently only get_user_pages_fast() can safely handle the writable gup
case due to its use of pud_access_permitted() to check whether the pud
entry is writable. In the gup slow path pud_write() is used instead of
pud_access_permitted() and to date it has been unimplemented, just calls
BUG_ON().