]> git.ipfire.org Git - thirdparty/linux.git/commit
s390/tape: Move idal allocation to core functions
authorJan Höppner <hoeppner@linux.ibm.com>
Thu, 16 Oct 2025 07:47:16 +0000 (09:47 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 21 Oct 2025 08:25:55 +0000 (10:25 +0200)
commita5e2ca22c18bcda97c7fc99d216ffd742405fb2f
tree0431c7f5787c403f025afd93f147d888cc208b93
parente039400f75f1a88675132abc57a18d090cf75209
s390/tape: Move idal allocation to core functions

Currently tapechar_check_idalbuffer() is part of tape_char.c and is used
to ensure the idal buffer is big enough for the requested I/O and
reallocates a new one if required. The same is done in tape_std.c when a
fixed block size is set using the mtsetblk command. This is essentially
duplicate code.

The allocation of the buffer that is required for I/O can be considered
core functionality. Move the idal buffer allocation to tape_core.c,
make it generally available, and reduce code duplication.

Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/char/tape.h
drivers/s390/char/tape_char.c
drivers/s390/char/tape_core.c
drivers/s390/char/tape_std.c