Implement collecting rpc errors and exporting them to userspace fuse
daemon via relayfs.
Errors are grouped per IP addresses and exported as an array.
Also move pcs_net* functions to a separate file.
Affects: #VSTOR-70161
https://pmc.acronis.work/browse/VSTOR-70161
Signed-off-by: Yuriy Vasilev
://pmc.acronis.work/browse/VSTOR-70161
Signed-off-by: Yuriy Vasilev
---
v2:
Replace flex array with a single struct containing a 'next' field
that refreshes after each successful read, provided there is a next elem
in the list. Now, after reading, only head of an rpc errors list is
cleaned.
Replac
://pmc.acronis.work/browse/VSTOR-70161
Signed-off-by: Yuriy Vasilev
---
v2: Replace flex array with a single struct containing a 'next' field
that refreshes after each successful read, provided there is a next elem
in the list. Now, after reading, only head of an rpc errors list is
cleaned.
Replac
Pass addr with PCS_ADDRTYPE_NONE to netaddr_cmp will lead to BUG. Let's
skip these errors.
Affects: #VSTOR-73400
Signed-off-by: Yuriy Vasilev
---
fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
b/fs/fuse/ki
This function allows checking if the cslist has been dropped before
usage.
https://pmc.acronis.work/browse/VSTOR-76384
Signed-off-by: Yuriy Vasilev
---
fs/fuse/kio/pcs/pcs_map.h | 12
1 file changed, 12 insertions(+)
diff --git a/fs/fuse/kio/pcs/pcs_map.h b/fs/fuse/kio/pcs
If try_cslist_get returns false, it indicates that the cslist has been
dropped and should not be handled without holding cs->lock.
https://pmc.acronis.work/browse/VSTOR-76384
Signed-off-by: Yuriy Vasilev
---
fs/fuse/kio/pcs/pcs_map.c | 5 -
1 file changed, 4 insertions(+), 1 delet
If try_cslist_get returns false, it indicates that the cslist has already
been dropped and the map has been truncated. So, this cslist should not
be handled.
https://pmc.acronis.work/browse/VSTOR-76384
Signed-off-by: Yuriy Vasilev
---
fs/fuse/kio/pcs/pcs_map.c | 3 ++-
1 file changed, 2
When the refcnt of a cslist is equal to 0, it indicates that the cslist
has been dropped and is going to be freed. In such cases, let's trigger
a BUG_ON to prevent use after free.
https://pmc.acronis.work/browse/VSTOR-76384
Signed-off-by: Yuriy Vasilev
---
fs/fuse/kio/pcs/pcs_map.h | 2
If try_cslist_get returns false, it indicates that the cslist has been
dropped and should not be handled without holding cs->lock.
https://pmc.acronis.work/browse/VSTOR-76384
Signed-off-by: Yuriy Vasilev
---
fs/fuse/kio/pcs/pcs_map.c | 5 -
1 file changed, 4 insertions(+), 1 delet
If try_cslist_get returns false, it indicates that the cslist has already
been dropped and the map has been truncated. So, this cslist should not
be handled.
https://pmc.acronis.work/browse/VSTOR-76384
Signed-off-by: Yuriy Vasilev
---
fs/fuse/kio/pcs/pcs_map.c | 3 ++-
1 file changed, 2
This function allows checking if the cslist has been dropped before
usage.
https://pmc.acronis.work/browse/VSTOR-76384
Signed-off-by: Yuriy Vasilev
---
fs/fuse/kio/pcs/pcs_map.c | 12
1 file changed, 12 insertions(+)
diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs
When the refcnt of a cslist is equal to 0, it indicates that the cslist
has been dropped and is going to be freed. In such cases, let's trigger
a BUG_ON to prevent use after free.
https://pmc.acronis.work/browse/VSTOR-76384
Signed-off-by: Yuriy Vasilev
---
fs/fuse/kio/pcs/pcs_map.c | 2
12 matches
Mail list logo