Skip to content

smb: improve search speed of SMB2 maperror

[email protected] linux-cifs linux-kselftest 9 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest1 patch 5 repliesIn review
  2. v85 patches 5 repliesSuperseded
  3. v75 patches 6 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v65 patches18 repliesSuperseded
v55 patches6 repliesSuperseded
v410 patches2 repliesSuperseded
v39 patches0 repliesSuperseded
v29 patches0 repliesSuperseded
v110 patches9 repliesSuperseded

Changes in v9 from the cover letter

- Fix build error when CONFIG_CIFS=y

Patches in v9 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1smb/client: introduce KUnit test to check search result of smb2_error_map_tablefs/smb/Kconfig fs/smb/client/smb2maperror.c fs/smb/client/smb2maperror_test.c+70 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v9 yet.

Read the v9 thread

Cover letter [PATCH v9 0/1] smb: improve search speed of SMB2 maperror

From: ChenXiaoSong <[email protected]>

v8: https://lore.kernel.org/linux-cifs/[email protected]/
v8->v9:
- Fix build error when CONFIG_CIFS=y

The following patches from v8 have already been merged into cifs-2.6.git for-next:
- 9303cdba632a smb/client: use bsearch() to find target in smb2_error_map_table
- 430ae68414c2 smb/client: check whether smb2_error_map_table is sorted in ascending order
- 9d40867a8685 cifs: Autogenerate SMB2 error mapping table
- ce609a4b3a27 cifs: Label SMB2 statuses with errors

v4: https://lore.kernel.org/linux-cifs/[email protected]/
The following patches from v4 have already been merged into the mainline:
- 01ab0d1640e3 smb/server: rename include guard in smb_common.h
- d8f52650b24d smb/client: update some SMB2 status strings
- d159702c9492 smb/client: add two elements to smb2_error_map_table array
- 523ecd976632 smb: rename to STATUS_SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP
- bf80d1517dc8 smb/client: remove unused elements from smb2_error_map_table array
- 6c1eb31ecb97 smb/client: reduce loop count in map_smb2_to_linux_error() by half

When searching for the last element and printing error message, the comparison count are shown in the table below:

+----------+--------+--------+
|          | Before | After  |
|          |Patchset|Patchset|
+----------+--------+--------+
|Comparison|  3486  |   10   |
|  Count   |        |        |
+----------+--------+--------+

ChenXiaoSong (1):
smb/client: introduce KUnit test to check search result of
smb2_error_map_table

 fs/smb/Kconfig                    | 17 ++++++++++++
 fs/smb/client/smb2maperror.c      |  8 ++++++
 fs/smb/client/smb2maperror_test.c | 45 +++++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+)
 create mode 100644 fs/smb/client/smb2maperror_test.c
Signature · 1 line
2.43.0