aboutsummaryrefslogtreecommitdiff
path: root/sbin/mdconfig
Commit message (Collapse)AuthorAgeFilesLines
* mdconfig_test: determine page size at run time rather than assuming 4kChuck Silvers2025-10-131-7/+8
| | | | | | Sponsored by: Netflix Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D52736
* Remove residual blank line at start of MakefileWarner Losh2024-07-152-2/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* mdconfig: remove the "cluster" option.Alan Somers2024-06-012-19/+16
| | | | | | | | | It's never had any effect. The kernel ignores it. Remove it from the documentation. But continue to parse it on the command line, for backwards-compatibility. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1271
* mdconfig: don't print NUL in the options listAlan Somers2024-06-012-19/+39
| | | | | | | Fixes: b01988d5e570 Sponsored by: Axcient Reviewed by: imp, Ricardo Branco Pull Request: https://github.com/freebsd/freebsd-src/pull/1268
* mdconfig: fix cleanup in the attach_size_rounddown testAlan Somers2024-05-311-1/+1
| | | | | | MFC after: 1 week MFC with: ed59446b47095fc20c1f77e832286f5b953cd289 Sponsored by: Axcient
* man filesystems: fix xrefs after move to section 4Alexander Ziaee2024-05-161-2/+2
| | | | | Reviewed by: des, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1077
* mdconfig: Print options when listing devicesRicardo Branco2024-05-101-14/+76
| | | | | | PR: 278624 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1210
* sbin: Remove ancient SCCS tags.Warner Losh2023-11-271-2/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-165-5/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* Mark usage function as __dead2 in programs where it does not returnAlfonso Gregory2023-07-071-1/+1
| | | | | | | | In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-3/+0
|
* md: Add MD_MUSTDEALLOC supportKa Ho Ng2021-09-112-3/+39
| | | | | | | | | | | This adds an option to detect if hole-punching is implemented by the underlying file system. If this flag is set, and if the underlying file system does not support hole-punching, md(4) fails BIO_DELETE requests with EOPNOTSUPP. Sponsored by: The FreeBSD Foundation Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D31883
* mdconfig: Add a regression test for mediasize roundingMark Johnston2021-08-311-0/+31
| | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation
* mdconfig tests: Correct a copy-pasted test descriptionMark Johnston2021-06-231-1/+1
| | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation
* [skip ci] fix a typo in a comment in mdconfig.cAlan Somers2021-03-031-1/+1
| | | | | | | Sponsored by: Axcient Reviewed by: mav, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28968
* Use Cm macros instead of Ar when referring to a specific memory disk typeMateusz Piotrowski2020-11-061-3/+3
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=367420
* Fix a typo and remove Xr's to vn(4) and vnconfig(4)Mateusz Piotrowski2020-11-061-7/+4
| | | | | | | | | | "mandoc -Tlint" complained about the Xr to vnconfig, which was removed in r238202. I am not sure but maybe it's time to do the same to vn(4). MFC after: 2 weeks Notes: svn path=/head/; revision=367419
* Drop "All rights reserved" from all my stuff. This includesEdward Tomasz Napierala2020-10-281-1/+0
| | | | | | | | | | | | Foundation copyrights, approved by emaste@. It does not include files which carry other people's copyrights; if you're one of those people, feel free to make similar change. Reviewed by: emaste, imp, gbe (manpages) Differential Revision: https://reviews.freebsd.org/D26980 Notes: svn path=/head/; revision=367105
* Use VOP_ADVISE() with POSIX_FADV_DONTNEED instead of IO_DIRECT toBruce Evans2018-12-212-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implement not double-caching for reads from vnode-backed md devices. Use VOP_ADVISE() similarly instead of !IO_DIRECT unsimilarly for writes. Add a "cache" option to mdconfig to allow changing the default of not caching. This depends on a recent commit to fix VOP_ADVISE(). A previous version had optimizations for sequential i/o's (merge the i/o's and only uncache for discontiguous i/o's and for full blocks), but optimizations and knowledge of block boundaries belong in VOP_ADVISE(). Read-ahead should also be handled better, by supporting it in md and discarding it in VOP_ADVISE(). POSIX_FADV_DONTNEED is ignored by zfs, but so is IO_DIRECT. POSIX_FADV_DONTNEED works better than IO_DIRECT if it is not ignored, since it only discards from the buffer cache immediately, while IO_DIRECT also discards from the page cache immediately. IO_DIRECT was not used for writes since it was claimed to be too slow, but most of the slowness for writes is from doing them synchronously by default. Non-synchronous writes still deadlock in many cases. IO_DIRECT only has a special implementation for ffs reads with DIRECTIO configured. Otherwise, if it is not ignored than it uses the buffer and page caches normally except for discarding everything after each i/o, and then it has much the same overheads as POSIX_FADV_DONTNEED. The overheads for reading with ffs and DIRECTIO were similar in tests of md. Reviewed by: kib Notes: svn path=/head/; revision=342297
* Fix missing (sub)options in usage message to prepare for adding a new one.Bruce Evans2018-12-211-1/+2
| | | | | | | Reviewed by: kib Notes: svn path=/head/; revision=342296
* Make (no)ro an alias for (no)readonlyPoul-Henning Kamp2018-12-161-0/+4
| | | | Notes: svn path=/head/; revision=342152
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Add ability to label md(4) devices.Maxim Sobolev2017-08-282-9/+26
| | | | | | | | | | | | | | | This feature comes from the fact that we rely memory-backed md(4) in our build process heavily. However, if the build goes haywire the allocated resources (i.e. swap and memory-backed md(4)'s) need to be purged. It is extremely useful to have ability to attach arbitrary labels to each of the virtual disks so that they can be identified and GC'ed if neecessary. MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D10457 Notes: svn path=/head/; revision=322969
* Add HAS_TESTS to all Makefiles that are currently using theEnji Cooper2017-08-021-0/+1
| | | | | | | | | `SUBDIR.${MK_TESTS}+= tests` idiom. This is a follow up to r321912. Notes: svn path=/projects/make-check-sandbox/; revision=321914
* Convert traditional ${MK_TESTS} conditional idiom for including testEnji Cooper2017-08-021-3/+1
| | | | | | | | | | | | | | directories to SUBDIR.${MK_TESTS} idiom This is being done to pave the way for future work (and homogenity) in ^/projects/make-check-sandbox . No functional change intended. MFC after: 1 weeks Notes: svn path=/head/; revision=321912
* Add MD_VERIFY option to enable O_VERIFY in open for vnode type.Stephen J. Kiernan2017-05-312-0/+13
| | | | | | | | | | | | | | | | Add -o [no]verify option to mdconfig (and document in man page.) Implement GEOM attribute MNT::verified to ask md if the backing vnode is verified. Check for MNT::verified in cd9660 mount to flag the mount as MNT_VERIFIED if the underlying device has been verified. Reviewed by: rwatson Approved by: sjg (mentor) Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D2902 Notes: svn path=/head/; revision=319358
* Make mdconfig(8) not segfault when the kernel returns garbage data.Edward Tomasz Napierala2017-02-191-2/+2
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=313943
* For MD_PRELOAD type md(4) devices, if there is a file name in the preloadedStephen J. Kiernan2017-02-131-1/+2
| | | | | | | | | | | | | | | | | | | meta-data, copy it into the softc structure. When returning md(4) device details to the caller, include the file name in any MD_PRELOAD type devices if it is set (first character is not NUL.) In mdconfig, for "preload" type md(4) devices, if there is file config available, print it in the file column of the output. Reviewed by: brooks Approved by: sjg (mentor) MFC after: 1 month Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D9529 Notes: svn path=/head/; revision=313701
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedEnji Cooper2016-05-041-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299094
* MFHGlen Barber2016-03-101-0/+11
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296625
| * DIRDEPS_BUILD: Connect MK_TESTS.Bryan Drewery2016-03-091-0/+11
| | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296587
* | Explicitly add more files to the 'runtime' package.Glen Barber2016-02-091-0/+1
| | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295450
* | First pass to fix the 'tests' packages.Glen Barber2016-02-021-0/+4
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295171
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andEnji Cooper2015-10-121-3/+0
| | | | | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison Notes: svn path=/head/; revision=289172
* Add 'p' postfix to mdconfig(8).Edward Tomasz Napierala2015-10-102-6/+9
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=289113
* It's 2015, and some people are still trying to use fdisk and thenEdward Tomasz Napierala2015-09-021-2/+1
| | | | | | | | | | | | | | | | go asking what debug flags to set for GEOM to make it work. Advice them to use gpart(8) instead. Something similar should probably done with disklabel, but I need to rewrite the disklabel examples first. Reviewed by: wblock@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3315 Notes: svn path=/head/; revision=287396
* Whoops, wrong flag.Edward Tomasz Napierala2015-08-061-1/+1
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=286361
* Tweak mdconfig(8) manual page, in particular revise the EXAMPLESEdward Tomasz Napierala2015-08-061-47/+46
| | | | | | | | | | | | | section. This removes stuff that doesn't really belong there, and simplifies examples for the basic operations. Reviewed by: wblock@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3198 Notes: svn path=/head/; revision=286360
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-276-615/+285
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge head from 7/28Simon J. Gerraty2014-08-191-2/+1
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Merge from headSimon J. Gerraty2014-05-081-1/+1
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * \ \ Merge headSimon J. Gerraty2014-04-287-21/+661
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044