Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

coda: remove CODA_FS_OLD_API

While fixing CONFIG_ leakages to the userspace kernel headers I ran into
CODA_FS_OLD_API.

After five years, are there still people using the old API left?
Especially considering that you have to choose at compile time which API
to support in the kernel (and distributions tend to offer the new API for
some time).

Jan: "The old API can definitely go. Around the time the new
interface went in there were some non-Coda userspace file system
implementations that took a while longer to convert to the new API,
but by now they all switched to the new interface or in some cases
to a FUSE-based solution."

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Adrian Bunk and committed by
Linus Torvalds
de0ca06a c0a1633b

+3 -79
-14
fs/Kconfig
··· 2093 2093 To compile the coda client support as a module, choose M here: the 2094 2094 module will be called coda. 2095 2095 2096 - config CODA_FS_OLD_API 2097 - bool "Use 96-bit Coda file identifiers" 2098 - depends on CODA_FS 2099 - help 2100 - A new kernel-userspace API had to be introduced for Coda v6.0 2101 - to support larger 128-bit file identifiers as needed by the 2102 - new realms implementation. 2103 - 2104 - However this new API is not backward compatible with older 2105 - clients. If you really need to run the old Coda userspace 2106 - cache manager then say Y. 2107 - 2108 - For most cases you probably want to say N. 2109 - 2110 2096 config AFS_FS 2111 2097 tristate "Andrew File System support (AFS) (EXPERIMENTAL)" 2112 2098 depends on INET && EXPERIMENTAL
+2 -4
fs/coda/coda_linux.c
··· 28 28 char * coda_f2s(struct CodaFid *f) 29 29 { 30 30 static char s[60]; 31 - #ifdef CONFIG_CODA_FS_OLD_API 32 - sprintf(s, "(%08x.%08x.%08x)", f->opaque[0], f->opaque[1], f->opaque[2]); 33 - #else 31 + 34 32 sprintf(s, "(%08x.%08x.%08x.%08x)", f->opaque[0], f->opaque[1], f->opaque[2], f->opaque[3]); 35 - #endif 33 + 36 34 return s; 37 35 } 38 36
-4
fs/coda/psdev.c
··· 378 378 MODULE_DESCRIPTION("Coda Distributed File System VFS interface"); 379 379 MODULE_ALIAS_CHARDEV_MAJOR(CODA_PSDEV_MAJOR); 380 380 MODULE_LICENSE("GPL"); 381 - #ifdef CONFIG_CODA_FS_OLD_API 382 - MODULE_VERSION("5.3.21"); 383 - #else 384 381 MODULE_VERSION("6.6"); 385 - #endif 386 382 387 383 static int __init init_coda(void) 388 384 {
+1 -14
fs/coda/upcall.c
··· 52 52 inp->ih.opcode = opcode; 53 53 inp->ih.pid = current->pid; 54 54 inp->ih.pgid = task_pgrp_nr(current); 55 - #ifdef CONFIG_CODA_FS_OLD_API 56 - memset(&inp->ih.cred, 0, sizeof(struct coda_cred)); 57 - inp->ih.cred.cr_fsuid = current->fsuid; 58 - #else 59 55 inp->ih.uid = current->fsuid; 60 - #endif 56 + 61 57 return (void*)inp; 62 58 } 63 59 ··· 162 166 union inputArgs *inp; 163 167 union outputArgs *outp; 164 168 int insize, outsize, error; 165 - #ifdef CONFIG_CODA_FS_OLD_API 166 - struct coda_cred cred = { 0, }; 167 - cred.cr_fsuid = uid; 168 - #endif 169 169 170 170 insize = SIZE(release); 171 171 UPARG(CODA_CLOSE); 172 172 173 - #ifdef CONFIG_CODA_FS_OLD_API 174 - memcpy(&(inp->ih.cred), &cred, sizeof(cred)); 175 - #else 176 173 inp->ih.uid = uid; 177 - #endif 178 - 179 174 inp->coda_close.VFid = *fid; 180 175 inp->coda_close.flags = flags; 181 176
-43
include/linux/coda.h
··· 199 199 typedef u_int32_t vgid_t; 200 200 #endif /*_VUID_T_ */ 201 201 202 - #ifdef CONFIG_CODA_FS_OLD_API 203 - struct CodaFid { 204 - u_int32_t opaque[3]; 205 - }; 206 - 207 - static __inline__ ino_t coda_f2i(struct CodaFid *fid) 208 - { 209 - if ( ! fid ) 210 - return 0; 211 - if (fid->opaque[1] == 0xfffffffe || fid->opaque[1] == 0xffffffff) 212 - return ((fid->opaque[0] << 20) | (fid->opaque[2] & 0xfffff)); 213 - else 214 - return (fid->opaque[2] + (fid->opaque[1]<<10) + (fid->opaque[0]<<20)); 215 - } 216 - 217 - struct coda_cred { 218 - vuid_t cr_uid, cr_euid, cr_suid, cr_fsuid; /* Real, efftve, set, fs uid*/ 219 - vgid_t cr_groupid, cr_egid, cr_sgid, cr_fsgid; /* same for groups */ 220 - }; 221 - 222 - #else /* not defined(CONFIG_CODA_FS_OLD_API) */ 223 - 224 202 struct CodaFid { 225 203 u_int32_t opaque[4]; 226 204 }; 227 205 228 206 #define coda_f2i(fid)\ 229 207 (fid ? (fid->opaque[3] ^ (fid->opaque[2]<<10) ^ (fid->opaque[1]<<20) ^ fid->opaque[0]) : 0) 230 - 231 - #endif 232 208 233 209 #ifndef _VENUS_VATTR_T_ 234 210 #define _VENUS_VATTR_T_ ··· 289 313 290 314 #define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t) 291 315 292 - #if 0 293 - #define CODA_KERNEL_VERSION 0 /* don't care about kernel version number */ 294 - #define CODA_KERNEL_VERSION 1 /* The old venus 4.6 compatible interface */ 295 - #endif 296 - #ifdef CONFIG_CODA_FS_OLD_API 297 - #define CODA_KERNEL_VERSION 2 /* venus_lookup got an extra parameter */ 298 - #else 299 316 #define CODA_KERNEL_VERSION 3 /* 128-bit file identifiers */ 300 - #endif 301 317 302 318 /* 303 319 * Venus <-> Coda RPC arguments ··· 297 329 struct coda_in_hdr { 298 330 u_int32_t opcode; 299 331 u_int32_t unique; /* Keep multiple outstanding msgs distinct */ 300 - #ifdef CONFIG_CODA_FS_OLD_API 301 - u_int16_t pid; /* Common to all */ 302 - u_int16_t pgid; /* Common to all */ 303 - u_int16_t sid; /* Common to all */ 304 - struct coda_cred cred; /* Common to all */ 305 - #else 306 332 pid_t pid; 307 333 pid_t pgid; 308 334 vuid_t uid; 309 - #endif 310 335 }; 311 336 312 337 /* Really important that opcode and unique are 1st two fields! */ ··· 574 613 /* CODA_PURGEUSER is a venus->kernel call */ 575 614 struct coda_purgeuser_out { 576 615 struct coda_out_hdr oh; 577 - #ifdef CONFIG_CODA_FS_OLD_API 578 - struct coda_cred cred; 579 - #else 580 616 vuid_t uid; 581 - #endif 582 617 }; 583 618 584 619 /* coda_zapfile: */