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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pull-ufs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull UFS updates from Al Viro:
"The bulk of this is Eric's conversion of UFS to new mount API, with a
bit of cleanups from me. I hoped to get stricter sanity checks on
superblock flags into that pile, but... next cycle, hopefully"

* tag 'pull-ufs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
ufs: convert ufs to the new mount API
ufs: reject multiple conflicting -o ufstype=... on mount
ufs: split ->s_mount_opt - don't mix flavour and on-error

+139 -177
+137 -170
fs/ufs/super.c
··· 83 83 #include <linux/blkdev.h> 84 84 #include <linux/backing-dev.h> 85 85 #include <linux/init.h> 86 - #include <linux/parser.h> 86 + #include <linux/fs_context.h> 87 + #include <linux/fs_parser.h> 87 88 #include <linux/buffer_head.h> 88 89 #include <linux/vfs.h> 89 90 #include <linux/log2.h> 90 - #include <linux/mount.h> 91 91 #include <linux/seq_file.h> 92 92 #include <linux/iversion.h> 93 93 ··· 289 289 va_start(args, fmt); 290 290 vaf.fmt = fmt; 291 291 vaf.va = &args; 292 - switch (UFS_SB(sb)->s_mount_opt & UFS_MOUNT_ONERROR) { 292 + switch (UFS_SB(sb)->s_on_err) { 293 293 case UFS_MOUNT_ONERROR_PANIC: 294 294 panic("panic (device %s): %s: %pV\n", 295 295 sb->s_id, function, &vaf); ··· 342 342 va_end(args); 343 343 } 344 344 345 - enum { 346 - Opt_type_old = UFS_MOUNT_UFSTYPE_OLD, 347 - Opt_type_sunx86 = UFS_MOUNT_UFSTYPE_SUNx86, 348 - Opt_type_sun = UFS_MOUNT_UFSTYPE_SUN, 349 - Opt_type_sunos = UFS_MOUNT_UFSTYPE_SUNOS, 350 - Opt_type_44bsd = UFS_MOUNT_UFSTYPE_44BSD, 351 - Opt_type_ufs2 = UFS_MOUNT_UFSTYPE_UFS2, 352 - Opt_type_hp = UFS_MOUNT_UFSTYPE_HP, 353 - Opt_type_nextstepcd = UFS_MOUNT_UFSTYPE_NEXTSTEP_CD, 354 - Opt_type_nextstep = UFS_MOUNT_UFSTYPE_NEXTSTEP, 355 - Opt_type_openstep = UFS_MOUNT_UFSTYPE_OPENSTEP, 356 - Opt_onerror_panic = UFS_MOUNT_ONERROR_PANIC, 357 - Opt_onerror_lock = UFS_MOUNT_ONERROR_LOCK, 358 - Opt_onerror_umount = UFS_MOUNT_ONERROR_UMOUNT, 359 - Opt_onerror_repair = UFS_MOUNT_ONERROR_REPAIR, 360 - Opt_err 345 + enum { Opt_type, Opt_onerror }; 346 + 347 + static const struct constant_table ufs_param_ufstype[] = { 348 + {"old", UFS_MOUNT_UFSTYPE_OLD}, 349 + {"sunx86", UFS_MOUNT_UFSTYPE_SUNx86}, 350 + {"sun", UFS_MOUNT_UFSTYPE_SUN}, 351 + {"sunos", UFS_MOUNT_UFSTYPE_SUNOS}, 352 + {"44bsd", UFS_MOUNT_UFSTYPE_44BSD}, 353 + {"ufs2", UFS_MOUNT_UFSTYPE_UFS2}, 354 + {"5xbsd", UFS_MOUNT_UFSTYPE_UFS2}, 355 + {"hp", UFS_MOUNT_UFSTYPE_HP}, 356 + {"nextstep-cd", UFS_MOUNT_UFSTYPE_NEXTSTEP_CD}, 357 + {"nextstep", UFS_MOUNT_UFSTYPE_NEXTSTEP}, 358 + {"openstep", UFS_MOUNT_UFSTYPE_OPENSTEP}, 359 + {} 361 360 }; 362 361 363 - static const match_table_t tokens = { 364 - {Opt_type_old, "ufstype=old"}, 365 - {Opt_type_sunx86, "ufstype=sunx86"}, 366 - {Opt_type_sun, "ufstype=sun"}, 367 - {Opt_type_sunos, "ufstype=sunos"}, 368 - {Opt_type_44bsd, "ufstype=44bsd"}, 369 - {Opt_type_ufs2, "ufstype=ufs2"}, 370 - {Opt_type_ufs2, "ufstype=5xbsd"}, 371 - {Opt_type_hp, "ufstype=hp"}, 372 - {Opt_type_nextstepcd, "ufstype=nextstep-cd"}, 373 - {Opt_type_nextstep, "ufstype=nextstep"}, 374 - {Opt_type_openstep, "ufstype=openstep"}, 375 - /*end of possible ufs types */ 376 - {Opt_onerror_panic, "onerror=panic"}, 377 - {Opt_onerror_lock, "onerror=lock"}, 378 - {Opt_onerror_umount, "onerror=umount"}, 379 - {Opt_onerror_repair, "onerror=repair"}, 380 - {Opt_err, NULL} 362 + static const struct constant_table ufs_param_onerror[] = { 363 + {"panic", UFS_MOUNT_ONERROR_PANIC}, 364 + {"lock", UFS_MOUNT_ONERROR_LOCK}, 365 + {"umount", UFS_MOUNT_ONERROR_UMOUNT}, 366 + {"repair", UFS_MOUNT_ONERROR_REPAIR}, 367 + {} 381 368 }; 382 369 383 - static int ufs_parse_options (char * options, unsigned * mount_options) 370 + static const struct fs_parameter_spec ufs_param_spec[] = { 371 + fsparam_enum ("ufstype", Opt_type, ufs_param_ufstype), 372 + fsparam_enum ("onerror", Opt_onerror, ufs_param_onerror), 373 + {} 374 + }; 375 + 376 + struct ufs_fs_context { 377 + unsigned int flavour, on_err; 378 + }; 379 + 380 + static int ufs_parse_param(struct fs_context *fc, struct fs_parameter *param) 384 381 { 385 - char * p; 386 - 382 + struct ufs_fs_context *ctx = fc->fs_private; 383 + struct fs_parse_result result; 384 + int opt; 385 + 387 386 UFSD("ENTER\n"); 388 - 389 - if (!options) 390 - return 1; 391 387 392 - while ((p = strsep(&options, ",")) != NULL) { 393 - substring_t args[MAX_OPT_ARGS]; 394 - int token; 395 - if (!*p) 396 - continue; 388 + opt = fs_parse(fc, ufs_param_spec, param, &result); 389 + if (opt < 0) 390 + return opt; 397 391 398 - token = match_token(p, tokens, args); 399 - switch (token) { 400 - case Opt_type_old: 401 - ufs_clear_opt (*mount_options, UFSTYPE); 402 - ufs_set_opt (*mount_options, UFSTYPE_OLD); 403 - break; 404 - case Opt_type_sunx86: 405 - ufs_clear_opt (*mount_options, UFSTYPE); 406 - ufs_set_opt (*mount_options, UFSTYPE_SUNx86); 407 - break; 408 - case Opt_type_sun: 409 - ufs_clear_opt (*mount_options, UFSTYPE); 410 - ufs_set_opt (*mount_options, UFSTYPE_SUN); 411 - break; 412 - case Opt_type_sunos: 413 - ufs_clear_opt(*mount_options, UFSTYPE); 414 - ufs_set_opt(*mount_options, UFSTYPE_SUNOS); 415 - break; 416 - case Opt_type_44bsd: 417 - ufs_clear_opt (*mount_options, UFSTYPE); 418 - ufs_set_opt (*mount_options, UFSTYPE_44BSD); 419 - break; 420 - case Opt_type_ufs2: 421 - ufs_clear_opt(*mount_options, UFSTYPE); 422 - ufs_set_opt(*mount_options, UFSTYPE_UFS2); 423 - break; 424 - case Opt_type_hp: 425 - ufs_clear_opt (*mount_options, UFSTYPE); 426 - ufs_set_opt (*mount_options, UFSTYPE_HP); 427 - break; 428 - case Opt_type_nextstepcd: 429 - ufs_clear_opt (*mount_options, UFSTYPE); 430 - ufs_set_opt (*mount_options, UFSTYPE_NEXTSTEP_CD); 431 - break; 432 - case Opt_type_nextstep: 433 - ufs_clear_opt (*mount_options, UFSTYPE); 434 - ufs_set_opt (*mount_options, UFSTYPE_NEXTSTEP); 435 - break; 436 - case Opt_type_openstep: 437 - ufs_clear_opt (*mount_options, UFSTYPE); 438 - ufs_set_opt (*mount_options, UFSTYPE_OPENSTEP); 439 - break; 440 - case Opt_onerror_panic: 441 - ufs_clear_opt (*mount_options, ONERROR); 442 - ufs_set_opt (*mount_options, ONERROR_PANIC); 443 - break; 444 - case Opt_onerror_lock: 445 - ufs_clear_opt (*mount_options, ONERROR); 446 - ufs_set_opt (*mount_options, ONERROR_LOCK); 447 - break; 448 - case Opt_onerror_umount: 449 - ufs_clear_opt (*mount_options, ONERROR); 450 - ufs_set_opt (*mount_options, ONERROR_UMOUNT); 451 - break; 452 - case Opt_onerror_repair: 453 - pr_err("Unable to do repair on error, will lock lock instead\n"); 454 - ufs_clear_opt (*mount_options, ONERROR); 455 - ufs_set_opt (*mount_options, ONERROR_REPAIR); 456 - break; 457 - default: 458 - pr_err("Invalid option: \"%s\" or missing value\n", p); 392 + switch (opt) { 393 + case Opt_type: 394 + if (ctx->flavour == result.uint_32) /* no-op */ 459 395 return 0; 396 + if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE) { 397 + pr_err("ufstype can't be changed during remount\n"); 398 + return -EINVAL; 460 399 } 400 + if (!ctx->flavour) { 401 + pr_err("conflicting ufstype options\n"); 402 + return -EINVAL; 403 + } 404 + ctx->flavour = result.uint_32; 405 + break; 406 + case Opt_onerror: 407 + ctx->on_err = result.uint_32; 408 + break; 409 + default: 410 + return -EINVAL; 461 411 } 462 - return 1; 412 + return 0; 463 413 } 464 414 465 415 /* ··· 424 474 struct ufs_super_block_first *usb1; 425 475 struct ufs_super_block_second *usb2; 426 476 struct ufs_super_block_third *usb3; 427 - unsigned mtype = sbi->s_mount_opt & UFS_MOUNT_UFSTYPE; 477 + unsigned mtype = sbi->s_flavour; 428 478 429 479 UFSD("ENTER, mtype=%u\n", mtype); 430 480 usb1 = ubh_get_usb_first(uspi); ··· 530 580 */ 531 581 static void ufs_put_cstotal(struct super_block *sb) 532 582 { 533 - unsigned mtype = UFS_SB(sb)->s_mount_opt & UFS_MOUNT_UFSTYPE; 583 + unsigned mtype = UFS_SB(sb)->s_flavour; 534 584 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; 535 585 struct ufs_super_block_first *usb1; 536 586 struct ufs_super_block_second *usb2; ··· 714 764 return res << uspi->s_bshift; 715 765 } 716 766 717 - static int ufs_fill_super(struct super_block *sb, void *data, int silent) 767 + static int ufs_fill_super(struct super_block *sb, struct fs_context *fc) 718 768 { 769 + struct ufs_fs_context *ctx = fc->fs_private; 770 + int silent = fc->sb_flags & SB_SILENT; 719 771 struct ufs_sb_info * sbi; 720 772 struct ufs_sb_private_info * uspi; 721 773 struct ufs_super_block_first * usb1; ··· 755 803 mutex_init(&sbi->s_lock); 756 804 spin_lock_init(&sbi->work_lock); 757 805 INIT_DELAYED_WORK(&sbi->sync_work, delayed_sync_fs); 758 - /* 759 - * Set default mount options 760 - * Parse mount options 761 - */ 762 - sbi->s_mount_opt = 0; 763 - ufs_set_opt (sbi->s_mount_opt, ONERROR_LOCK); 764 - if (!ufs_parse_options ((char *) data, &sbi->s_mount_opt)) { 765 - pr_err("wrong mount options\n"); 766 - goto failed; 767 - } 768 - if (!(sbi->s_mount_opt & UFS_MOUNT_UFSTYPE)) { 806 + 807 + sbi->s_flavour = ctx->flavour; 808 + sbi->s_on_err = ctx->on_err; 809 + 810 + if (!sbi->s_flavour) { 769 811 if (!silent) 770 812 pr_err("You didn't specify the type of your ufs filesystem\n\n" 771 813 "mount -t ufs -o ufstype=" 772 814 "sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...\n\n" 773 815 ">>>WARNING<<< Wrong ufstype may corrupt your filesystem, " 774 816 "default is ufstype=old\n"); 775 - ufs_set_opt (sbi->s_mount_opt, UFSTYPE_OLD); 817 + sbi->s_flavour = UFS_MOUNT_UFSTYPE_OLD; 776 818 } 777 819 778 820 uspi = kzalloc(sizeof(struct ufs_sb_private_info), GFP_KERNEL); ··· 782 836 sb->s_time_min = S32_MIN; 783 837 sb->s_time_max = S32_MAX; 784 838 785 - switch (sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) { 839 + switch (sbi->s_flavour) { 786 840 case UFS_MOUNT_UFSTYPE_44BSD: 787 841 UFSD("ufstype=44bsd\n"); 788 842 uspi->s_fsize = block_size = 512; ··· 981 1035 goto magic_found; 982 1036 } 983 1037 984 - if ((((sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) == UFS_MOUNT_UFSTYPE_NEXTSTEP) 985 - || ((sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) == UFS_MOUNT_UFSTYPE_NEXTSTEP_CD) 986 - || ((sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) == UFS_MOUNT_UFSTYPE_OPENSTEP)) 1038 + if ((sbi->s_flavour == UFS_MOUNT_UFSTYPE_NEXTSTEP 1039 + || sbi->s_flavour == UFS_MOUNT_UFSTYPE_NEXTSTEP_CD 1040 + || sbi->s_flavour == UFS_MOUNT_UFSTYPE_OPENSTEP) 987 1041 && uspi->s_sbbase < 256) { 988 1042 ubh_brelse_uspi(uspi); 989 1043 ubh = NULL; ··· 1183 1237 uspi->s_bpf = uspi->s_fsize << 3; 1184 1238 uspi->s_bpfshift = uspi->s_fshift + 3; 1185 1239 uspi->s_bpfmask = uspi->s_bpf - 1; 1186 - if ((sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) == UFS_MOUNT_UFSTYPE_44BSD || 1187 - (sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) == UFS_MOUNT_UFSTYPE_UFS2) 1240 + if (sbi->s_flavour == UFS_MOUNT_UFSTYPE_44BSD || 1241 + sbi->s_flavour == UFS_MOUNT_UFSTYPE_UFS2) 1188 1242 uspi->s_maxsymlinklen = 1189 1243 fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen); 1190 1244 ··· 1236 1290 return -ENOMEM; 1237 1291 } 1238 1292 1239 - static int ufs_remount (struct super_block *sb, int *mount_flags, char *data) 1293 + static int ufs_reconfigure(struct fs_context *fc) 1240 1294 { 1241 1295 struct ufs_sb_private_info * uspi; 1242 1296 struct ufs_super_block_first * usb1; 1243 1297 struct ufs_super_block_third * usb3; 1244 - unsigned new_mount_opt, ufstype; 1245 - unsigned flags; 1298 + struct ufs_fs_context *ctx = fc->fs_private; 1299 + struct super_block *sb = fc->root->d_sb; 1300 + unsigned int ufstype; 1301 + unsigned int flags; 1246 1302 1247 1303 sync_filesystem(sb); 1248 1304 mutex_lock(&UFS_SB(sb)->s_lock); ··· 1253 1305 usb1 = ubh_get_usb_first(uspi); 1254 1306 usb3 = ubh_get_usb_third(uspi); 1255 1307 1256 - /* 1257 - * Allow the "check" option to be passed as a remount option. 1258 - * It is not possible to change ufstype option during remount 1259 - */ 1260 - ufstype = UFS_SB(sb)->s_mount_opt & UFS_MOUNT_UFSTYPE; 1261 - new_mount_opt = 0; 1262 - ufs_set_opt (new_mount_opt, ONERROR_LOCK); 1263 - if (!ufs_parse_options (data, &new_mount_opt)) { 1264 - mutex_unlock(&UFS_SB(sb)->s_lock); 1265 - return -EINVAL; 1266 - } 1267 - if (!(new_mount_opt & UFS_MOUNT_UFSTYPE)) { 1268 - new_mount_opt |= ufstype; 1269 - } else if ((new_mount_opt & UFS_MOUNT_UFSTYPE) != ufstype) { 1270 - pr_err("ufstype can't be changed during remount\n"); 1271 - mutex_unlock(&UFS_SB(sb)->s_lock); 1272 - return -EINVAL; 1273 - } 1308 + ufstype = UFS_SB(sb)->s_flavour; 1274 1309 1275 - if ((bool)(*mount_flags & SB_RDONLY) == sb_rdonly(sb)) { 1276 - UFS_SB(sb)->s_mount_opt = new_mount_opt; 1310 + if ((bool)(fc->sb_flags & SB_RDONLY) == sb_rdonly(sb)) { 1311 + UFS_SB(sb)->s_on_err = ctx->on_err; 1277 1312 mutex_unlock(&UFS_SB(sb)->s_lock); 1278 1313 return 0; 1279 1314 } ··· 1264 1333 /* 1265 1334 * fs was mouted as rw, remounting ro 1266 1335 */ 1267 - if (*mount_flags & SB_RDONLY) { 1336 + if (fc->sb_flags & SB_RDONLY) { 1268 1337 ufs_put_super_internal(sb); 1269 1338 usb1->fs_time = ufs_get_seconds(sb); 1270 1339 if ((flags & UFS_ST_MASK) == UFS_ST_SUN ··· 1300 1369 sb->s_flags &= ~SB_RDONLY; 1301 1370 #endif 1302 1371 } 1303 - UFS_SB(sb)->s_mount_opt = new_mount_opt; 1372 + UFS_SB(sb)->s_on_err = ctx->on_err; 1304 1373 mutex_unlock(&UFS_SB(sb)->s_lock); 1305 1374 return 0; 1306 1375 } ··· 1308 1377 static int ufs_show_options(struct seq_file *seq, struct dentry *root) 1309 1378 { 1310 1379 struct ufs_sb_info *sbi = UFS_SB(root->d_sb); 1311 - unsigned mval = sbi->s_mount_opt & UFS_MOUNT_UFSTYPE; 1312 - const struct match_token *tp = tokens; 1380 + unsigned mval = sbi->s_flavour; 1381 + const struct constant_table *tp; 1313 1382 1314 - while (tp->token != Opt_onerror_panic && tp->token != mval) 1383 + tp = ufs_param_ufstype; 1384 + while (tp->value && tp->value != mval) 1315 1385 ++tp; 1316 - BUG_ON(tp->token == Opt_onerror_panic); 1317 - seq_printf(seq, ",%s", tp->pattern); 1386 + seq_printf(seq, ",ufstype=%s", tp->name); 1318 1387 1319 - mval = sbi->s_mount_opt & UFS_MOUNT_ONERROR; 1320 - while (tp->token != Opt_err && tp->token != mval) 1388 + tp = ufs_param_onerror; 1389 + mval = sbi->s_on_err; 1390 + while (tp->value && tp->value != mval) 1321 1391 ++tp; 1322 - BUG_ON(tp->token == Opt_err); 1323 - seq_printf(seq, ",%s", tp->pattern); 1392 + seq_printf(seq, ",onerror=%s", tp->name); 1324 1393 1325 1394 return 0; 1326 1395 } ··· 1414 1483 .put_super = ufs_put_super, 1415 1484 .sync_fs = ufs_sync_fs, 1416 1485 .statfs = ufs_statfs, 1417 - .remount_fs = ufs_remount, 1418 1486 .show_options = ufs_show_options, 1419 1487 }; 1420 1488 1421 - static struct dentry *ufs_mount(struct file_system_type *fs_type, 1422 - int flags, const char *dev_name, void *data) 1489 + static int ufs_get_tree(struct fs_context *fc) 1423 1490 { 1424 - return mount_bdev(fs_type, flags, dev_name, data, ufs_fill_super); 1491 + return get_tree_bdev(fc, ufs_fill_super); 1492 + } 1493 + 1494 + static void ufs_free_fc(struct fs_context *fc) 1495 + { 1496 + kfree(fc->fs_private); 1497 + } 1498 + 1499 + static const struct fs_context_operations ufs_context_ops = { 1500 + .parse_param = ufs_parse_param, 1501 + .get_tree = ufs_get_tree, 1502 + .reconfigure = ufs_reconfigure, 1503 + .free = ufs_free_fc, 1504 + }; 1505 + 1506 + static int ufs_init_fs_context(struct fs_context *fc) 1507 + { 1508 + struct ufs_fs_context *ctx; 1509 + 1510 + ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); 1511 + if (!ctx) 1512 + return -ENOMEM; 1513 + 1514 + if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE) { 1515 + struct super_block *sb = fc->root->d_sb; 1516 + struct ufs_sb_info *sbi = UFS_SB(sb); 1517 + 1518 + ctx->flavour = sbi->s_flavour; 1519 + ctx->on_err = sbi->s_on_err; 1520 + } else { 1521 + ctx->flavour = 0; 1522 + ctx->on_err = UFS_MOUNT_ONERROR_LOCK; 1523 + } 1524 + 1525 + fc->fs_private = ctx; 1526 + fc->ops = &ufs_context_ops; 1527 + 1528 + return 0; 1425 1529 } 1426 1530 1427 1531 static struct file_system_type ufs_fs_type = { 1428 1532 .owner = THIS_MODULE, 1429 1533 .name = "ufs", 1430 - .mount = ufs_mount, 1431 1534 .kill_sb = kill_block_super, 1535 + .init_fs_context = ufs_init_fs_context, 1536 + .parameters = ufs_param_spec, 1432 1537 .fs_flags = FS_REQUIRES_DEV, 1433 1538 }; 1434 1539 MODULE_ALIAS_FS("ufs");
+2 -7
fs/ufs/ufs.h
··· 24 24 struct ufs_cg_private_info * s_ucpi[UFS_MAX_GROUP_LOADED]; 25 25 unsigned s_cgno[UFS_MAX_GROUP_LOADED]; 26 26 unsigned short s_cg_loaded; 27 - unsigned s_mount_opt; 27 + unsigned s_flavour; 28 + unsigned s_on_err; 28 29 struct super_block *sb; 29 30 int work_queued; /* non-zero if the delayed work is queued */ 30 31 struct delayed_work sync_work; /* FS sync delayed work */ ··· 53 52 }; 54 53 55 54 /* mount options */ 56 - #define UFS_MOUNT_ONERROR 0x0000000F 57 55 #define UFS_MOUNT_ONERROR_PANIC 0x00000001 58 56 #define UFS_MOUNT_ONERROR_LOCK 0x00000002 59 57 #define UFS_MOUNT_ONERROR_UMOUNT 0x00000004 60 58 #define UFS_MOUNT_ONERROR_REPAIR 0x00000008 61 59 62 - #define UFS_MOUNT_UFSTYPE 0x0000FFF0 63 60 #define UFS_MOUNT_UFSTYPE_OLD 0x00000010 64 61 #define UFS_MOUNT_UFSTYPE_44BSD 0x00000020 65 62 #define UFS_MOUNT_UFSTYPE_SUN 0x00000040 ··· 68 69 #define UFS_MOUNT_UFSTYPE_HP 0x00000800 69 70 #define UFS_MOUNT_UFSTYPE_UFS2 0x00001000 70 71 #define UFS_MOUNT_UFSTYPE_SUNOS 0x00002000 71 - 72 - #define ufs_clear_opt(o,opt) o &= ~UFS_MOUNT_##opt 73 - #define ufs_set_opt(o,opt) o |= UFS_MOUNT_##opt 74 - #define ufs_test_opt(o,opt) ((o) & UFS_MOUNT_##opt) 75 72 76 73 /* 77 74 * Debug code