Jason Volk
7b67b106b6
ircd::fs: Add convenience tls scratch buffers for name and path manip.
2019-02-07 20:49:26 -08:00
Jason Volk
5b3bee79a6
ircd::fs: Normalize buffering for path interface; add path features.
2019-01-25 11:49:24 -08:00
Jason Volk
2886924bf0
ircd::fs: Reorg path interface related.
2019-01-25 10:39:37 -08:00
Jason Volk
14b57f2eac
ircd: Rename aio.h/aio.cc with fs_ prefix.
2019-01-23 13:20:38 -08:00
Jason Volk
cbf456a388
ircd: Rename and refactor ircd::assertion interface into ircd::panic.
2019-01-13 16:37:31 -08:00
Jason Volk
c2103ec0d6
ircd::fs: Add sysfs access interface.
2019-01-01 21:15:10 -08:00
Jason Volk
23c1a87c4c
ircd::fs: Add tools for device related.
2019-01-01 19:53:12 -08:00
Jason Volk
663b164f39
ircd::fs: Abstract the common options into opts struct.
2018-12-29 20:02:22 -08:00
Jason Volk
3466597981
ircd::fs: Various reorg; cleanup.
2018-12-29 19:43:17 -08:00
Jason Volk
30dc2ce7ed
ircd::fs: Various cleanup / renames.
2018-12-28 15:30:29 -08:00
Jason Volk
dad9ec8e44
ircd::fs: Increase default io_submit threshold.
2018-12-27 15:05:21 -08:00
Jason Volk
5fb887096b
ircd::fs: Prevent ODR warnings from these weak defs.
2018-12-26 15:49:08 -08:00
Jason Volk
29e7fa3515
ircd::ctx: Use closure for continuation.
2018-12-22 21:03:14 -08:00
Jason Volk
37ba013413
ircd::ctx: Simplify continuation; eliminate to_asio derived type.
2018-12-22 20:11:00 -08:00
Jason Volk
c2b344b74e
ircd: Allow exceptions to propagate from various interruptors.
2018-12-22 17:24:48 -08:00
Jason Volk
69e3677dd5
ircd::fs: Add instrumentation related for dynamic stack array.
2018-12-21 13:19:34 -08:00
Jason Volk
a5ebc28928
ircd::fs::aio: Reorganize with symbol overriding; add conf items.
2018-12-21 13:04:57 -08:00
Jason Volk
c3d95aa8de
ircd::fs: Remove the thread_local convenience for make_iov().
2018-12-21 12:57:58 -08:00
Jason Volk
2f36fec41a
ircd::fs: Cleanup the duplicate support state indicators.
2018-12-21 12:09:44 -08:00
Jason Volk
152060da36
ircd::fs: Create iov on the stack rather than with tls.
2018-12-21 10:28:51 -08:00
Jason Volk
b4910319e0
ircd: Add various comments / documentations.
2018-12-19 12:35:21 -08:00
Jason Volk
582628fb71
ircd::fs: Add read/write options to restart operation on EINTR.
2018-12-18 14:44:25 -08:00
Jason Volk
254d5ccb50
ircd::fs: Add 'all' write option with internal loop.
2018-12-18 14:44:25 -08:00
Jason Volk
bb3a68a95e
ircd::fs: Handle partial reads internally with 'all' option.
2018-12-18 14:44:25 -08:00
Jason Volk
c3cf4c02dd
ircd::fs: Use posix iov in AIO interface arguments.
2018-12-18 14:21:09 -08:00
Jason Volk
77a84b18d3
ircd::fs: Add offset to make_iov() suite.
2018-12-18 14:21:09 -08:00
Jason Volk
81ca6fecf4
ircd::fs: Add slice usage warning reasons; simplify conditional logic.
2018-12-17 16:20:54 -08:00
Jason Volk
a2a66eb314
ircd::fs: Deinline various error ctor; simplify various error handling.
2018-12-15 20:50:32 -08:00
Jason Volk
2cc7831770
ircd::fs: Add option to bypass AIO for specific operations.
2018-12-15 18:17:59 -08:00
Jason Volk
c4d5f03725
ircd::fs: Add compat interface for range flush()/sync().
2018-12-13 18:04:48 -08:00
Jason Volk
5e8d5562da
ircd::fs: Simplify interface.
2018-12-13 17:46:08 -08:00
Jason Volk
9d423f84d8
ircd:;fs: Rename various fsync/sync related.
2018-12-13 16:54:09 -08:00
Jason Volk
b80735c575
ircd::fs: Add sync()/syncfs().
2018-12-12 13:16:47 -08:00
Jason Volk
c156266bd8
ircd::fs: Simplify error handling.
2018-12-12 13:16:47 -08:00
Jason Volk
638a629151
ircd::fs: Translate boost to std for exceptions out of stdin::readline.
2018-12-11 14:32:51 -08:00
Jason Volk
45bf911952
ircd::conf: Add feature to toggle whether conf item is persisted in a db.
2018-12-08 16:27:32 -08:00
Jason Volk
313bffffc2
ircd::fs: Add path to error message thrown from ls() et al.
2018-12-08 15:50:08 -08:00
Jason Volk
1ba22a21ba
ircd: Disperse accumulated global options as conf items in namespaces.
2018-12-08 15:36:34 -08:00
Jason Volk
24e423c714
ircd::fs: Add support test for fallocate().
2018-12-03 12:58:42 -08:00
Jason Volk
47d6fbb35f
ircd::fs: Consolidate support tests and indications into namespace.
2018-12-03 12:55:52 -08:00
Jason Volk
711dfacd9a
ircd::fs: Improve strategy for AIO fsync/fdsync related.
2018-12-01 16:10:53 -08:00
Jason Volk
ca525b081f
ircd: Add noaio global flag; add command line option.
2018-12-01 15:55:53 -08:00
Jason Volk
965ecd16e5
ircd::fs: Break apart / improve make_iov() related stack / cleanup typedefs.
2018-12-01 15:46:38 -08:00
Jason Volk
2dc36775a8
ircd::fs: Check IOV_MAX limits for make_iov().
2018-12-01 15:21:06 -08:00
Jason Volk
58d80ddc53
ircd::fs: Add option to toggle AIO for fsync related.
2018-11-29 10:18:43 -08:00
Jason Volk
44bf18d4df
ircd::fs: Integrate read(iov) suite.
2018-11-28 17:26:25 -08:00
Jason Volk
466ad228b0
ircd::fs: Integrate an overwrite() iov suite.
2018-11-28 17:26:06 -08:00
Jason Volk
20fe537409
ircd::fs: Integrate append() iov suite.
2018-11-28 17:21:28 -08:00
Jason Volk
db36ea6255
ircd::fs: fs::write() stack based on pwritev() using iov.
2018-11-28 17:10:48 -08:00
Jason Volk
c9b10bd841
ircd::fs: Use better typedefs for vector_view of buffers.
2018-11-28 17:10:17 -08:00
Jason Volk
eff4c475e3
ircd::fs: Add iov util header; make aio interface to fs exclusively iov.
2018-11-28 16:53:04 -08:00
Jason Volk
5cdd2e6376
ircd::fs::aio: Add statistics for AIO subsystem w/ console cmd.
2018-11-27 19:54:24 -08:00
Jason Volk
062906143f
ircd::fs: Add an fs/aio.h header. Reorg various aio namespace related.
2018-11-27 18:09:12 -08:00
Jason Volk
36bb0d3175
ircd: Integrate all boost::system::system_error with stdlib.
2018-11-08 23:05:11 -08:00
Jason Volk
94bfe39ec6
ircd::fs: Save the std openmode in the fd::opts struct.
2018-11-01 23:35:52 -07:00
Jason Volk
e540ad1412
ircd::fs: Better results for read buffer alignments.
2018-10-18 09:44:34 -07:00
Jason Volk
4c95b39ce5
configure: Add missing sys/stat.h sys/statvfs.h header checks.
2018-10-18 09:28:01 -07:00
Jason Volk
02f64c7f34
ircd: Add ios unit to provide a more central control point for asio.
2018-10-17 05:12:10 -07:00
Jason Volk
8900c7d95e
Add datadir (share) configure, Makefile and ircd::fs related.
2018-09-13 22:02:52 -07:00
Jason Volk
09529ae311
ircd: Fix std::ios::openmode name.
2018-09-13 05:12:01 -07:00
Jason Volk
3426fc650f
ircd::fs: Test if O_DIRECT possible on path target.
2018-09-04 01:43:21 -07:00
Jason Volk
107e4b59af
ircd::fs: Use the gnu_dev_*() suite rather than sys/types macros.
2018-09-01 23:51:54 -07:00
Jason Volk
5dd9b7a3cf
ircd::fs: Support for finding the O_DIRECT alignments from system.
2018-08-28 20:15:40 -07:00
Jason Volk
5825b21231
ircd::fs: Disable fsync()/fdatasync() via AIO for now.
2018-08-24 00:40:35 -07:00
Jason Volk
e0024b82ea
ircd::fs: Use fallocate() rather than posix_fallocate(); add keep_size.
2018-08-23 23:08:41 -07:00
Jason Volk
f666728d37
ircd::fs: Add assertion; minor.
2018-08-23 23:08:41 -07:00
Jason Volk
e3827124e9
ircd::fs: Use lseek() for size(fd) overload.
2018-08-23 23:08:22 -07:00
Jason Volk
79d4c15ff5
ircd::fs: Deinline and improve append() related.
2018-08-23 23:08:22 -07:00
Jason Volk
55b2b128c6
ircd::fs: Add an fallocate wrapper for now.
2018-08-23 21:24:35 -07:00
Jason Volk
0ce45b50d6
ircd::fs: Add truncate() suite.
2018-08-23 21:24:19 -07:00
Jason Volk
888862ec56
ircd::fs: Deinline and improve overwrite() suite.
2018-08-23 21:23:42 -07:00
Jason Volk
1a1002c96d
ircd::fs: Propagate error_code through exception system; improve stack.
2018-08-23 03:31:36 -07:00
Jason Volk
32285d5dac
ircd::fs: Add a uuid-ish util for an fd.
2018-08-20 22:44:39 -07:00
Jason Volk
b5c2270e8c
ircd::fs: Add prefetch skeleton linkage.
2018-08-18 23:08:55 -07:00
Jason Volk
adee757303
ircd::fs: Add fsync()/fdsync() w/ AIO.
2018-08-18 23:02:34 -07:00
Jason Volk
d7075d73e5
ircd::fs: Additional make_path() overload.
2018-08-17 12:51:49 -07:00
Jason Volk
951cd4ad63
ircd::fs: Update/fix syspaths related.
2018-08-12 16:46:52 -07:00
Jason Volk
32b6e018c9
ircd::fs: Show path in rethrown errmsg.
2018-08-12 16:42:50 -07:00
Jason Volk
9ae4e225d3
ircd::fs: Automatic -p behavior for mkdir().
2018-08-12 16:38:50 -07:00
Jason Volk
8fb580aaf5
configure/ircd: Overhaul install system directory related.
2018-08-12 16:30:51 -07:00
Jason Volk
57bfe311c6
ircd::fs: Add experimental stdin::tty support.
2018-06-03 09:49:00 -07:00
Jason Volk
79b2bdfb42
ircd::fs: Add prefetch().
2018-06-02 11:44:53 -07:00
Jason Volk
45155d5e4d
ircd::fs: Add fd::opts nocreate open() option.
2018-05-30 04:59:05 -07:00
Jason Volk
8395a7844c
ircd::fs: Add fd::opts direct and cloexec flags; reorg fd ctor related.
2018-05-30 04:59:05 -07:00
Jason Volk
f8ea91cdee
ircd::fs: Add append(fd) with explicit lseek(SEEK_END).
2018-05-30 04:59:04 -07:00
Jason Volk
ead2a567ad
ircd::fs: Refactor fs::write stack for fs::fd.
2018-05-30 04:59:04 -07:00
Jason Volk
501e82e8aa
ircd::fs: Refactor fs::read stack for fs::fd.
2018-05-30 04:59:04 -07:00
Jason Volk
a9e73d898c
ircd::fs: Add size(fd) from sys stat().
2018-05-30 04:59:04 -07:00
Jason Volk
955d8921b9
ircd::fs: Add basic fd wrapper object.
2018-05-30 04:59:04 -07:00
Jason Volk
4cb6845ac1
ircd::fs: Use vector_view for make_path related.
2018-05-24 19:11:05 -07:00
Jason Volk
bf445492db
ircd::fs: Use const_buffer rather than string_view in various returns.
2018-04-24 18:34:46 -07:00
Jason Volk
a08670cf48
ircd::fs: Support the yielding stdin readline in libircd.
2018-03-23 22:52:36 -07:00
Jason Volk
4670fdbd1b
ircd: Remove ircd::error_code typedef with more local typedefs.
2018-03-08 10:08:38 -08:00
Jason Volk
ceac1d96ac
ircd::fs: Add missing exception translation to read()/write() dispatchers.
2018-02-26 20:45:40 -08:00
Jason Volk
e37a8599f7
ircd::fs: Add remove() / rename() support.
2018-02-26 20:45:14 -08:00
Jason Volk
121be689e8
ircd::fs: Fix namespace ambiguities; various interface updates.
2018-02-26 20:35:09 -08:00
Jason Volk
7142cbf735
ircd: Move magic out of fs::.
2018-02-18 22:54:54 -08:00
Jason Volk
f5197cc8ff
ircd::fs: Add magic interface.
2018-02-18 01:12:09 -08:00
Jason Volk
4a56c0a1cd
ircd::fs: Asynchronous writes to local filesystem.
2018-02-06 00:02:18 -08:00
Jason Volk
79198527a7
configure/ircd: Consider all boost headers unconditional.
2018-02-05 21:24:36 -08:00
Jason Volk
be624ca7f6
Update Copyrastafaris.
2018-02-05 21:24:34 -08:00
Jason Volk
d53eef4ab6
ircd: Eliminate the raw_buffer concept.
2018-02-05 18:54:55 -08:00
Jason Volk
cc1b82cd59
ircd::fs: Log a warning when there's no support for any async IO.
2018-01-24 11:50:50 -08:00
Jason Volk
6b7399bf4a
ircd::fs: Simplify API/AIO by eliminating callback: ctx yield only for now.
2018-01-15 03:12:56 -08:00
Jason Volk
c698101d6d
ircd::fs: Initial asynchronous file IO support for Linux platforms.
2018-01-10 22:09:05 -08:00
Jason Volk
8acdf52443
ircd::fs: Use direct kernel interface rather than glibc aio nonsense.
2018-01-10 00:55:08 -08:00
Jason Volk
6a552e349e
ircd: Preliminary AIO experimental stub on linux platforms.
2018-01-09 16:49:53 -08:00
Jason Volk
bdf696b91f
ircd::fs: Add these string_view overloads.
...
This is to not force string conversions in callerspace. Right now everything
gets converted to std::string internally but eventually string_view may be
preferable. Either way the overload finds the best behavior for now.
2017-12-24 20:25:40 -07:00
Jason Volk
27721860c2
ircd::fs: Add a file sizing suite.
2017-12-24 20:25:40 -07:00
Jason Volk
ea26fd0016
ircd::fs: Path cleanup.
2017-11-30 11:23:46 -08:00
Jason Volk
a663e80254
ircd::fs: Fix narrowing.
2017-10-11 20:54:01 -07:00
Jason Volk
3425659d7f
ircd::fs: Add very preliminary aio and ircd init for such.
2017-10-11 20:54:01 -07:00
Jason Volk
5a8cc4e8cd
ircd::fs: Fix error.
2017-10-03 04:27:14 -07:00
Jason Volk
4954c90e27
ircd::fs: Improve basic file read/write/append into buffers.
2017-10-03 04:27:14 -07:00
Jason Volk
6db3c55f74
ircd::fs: Add directory creation.
2017-08-23 15:52:14 -06:00
Jason Volk
5751555834
ircd::fs: Fix ls_recursive / directory iteration related.
2017-08-23 15:43:25 -06:00
Jason Volk
9ea5eceb0e
ircd::fs: Add function to read file from local filesystem.
2017-08-23 14:56:52 -06:00
Jason Volk
2e7dd1e5ad
ircd::fs: Fixes/renames to local filesystem support subsystem.
2017-03-30 16:04:19 -07:00
Jason Volk
6d2d5a71f5
ircd::fs: Add function to build path.
2016-09-26 16:06:56 -07:00
Jason Volk
0913873b30
ircd::fs: Generalize DBPATH.
2016-09-26 16:06:56 -07:00
Jason Volk
4b9dc5bff4
ircd: Populate path:: with boost::filesystem wrapping.
2016-09-09 16:17:02 -07:00
Jason Volk
a8ed3d2dc2
Simplify ircd::fs::path related to ircd::path.
2016-09-09 16:17:01 -07:00
Jason Volk
102c15d768
ircd: Remove fs path relocations for windows.
2016-09-09 16:17:01 -07:00
Jason Volk
153b017358
ircd: Remove pidfile.
2016-09-09 16:17:01 -07:00
Jason Volk
9d0a959bb5
MAPI IV. This iteration leverages the C++11 standardized RTTI.
...
* Simplifies the export declarations for module developers. While
MAPI III utilized a flexible key-value vector to eliminate positional
arguments in a header initializer, now the developer simply makes
a list of pointers to what they want to export for injection into
IRCd. Example:
mapi::header IRCD_MODULE
{
"mymod",
"My module adds a command, a hook, and a CLICAP",
&my_cmdtab,
&some_hook,
&clicaptab
};
* Distributes the handlers for items passed to the above vector.
Anyone can add a type-handler to the module system from anywhere in IRCd
(and other modules?) When your type is encountered a handler is called
providing the symbol name to read out of the module. Example in parser.cc:
mods::add_loader<Message>([]
(mod &loading, const std::string &symbol)
{
auto &msg(get<Message>(loading, symbol));
add_command(msg.name, msg);
});
2016-09-09 16:17:01 -07:00
Jason Volk
25d7274afa
Fix missing namespace import.
2016-08-20 20:39:31 -07:00
Jason Volk
61b517ca3c
Precompile and remove most include directives. Notes:
...
* To benefit from the precompiled-header (PCH) it MUST provide "the first C token."
Advantages:
Never worry about the include stack again. Remember, this means one less thing
for random module developers, community people learning C++, and new developers
to deal with. It should reduce the learning curve and barrier for participation.
Disadvantages:
Makes overall compilation a bit slower, especially without any additional
work to improve it again. There are several opportunities, places where the
PCH is probably being ignored, etc that can be addressed.
2016-08-20 19:30:33 -07:00
Jason Volk
a1ee5034a2
Organize fs/path related into namespace.
2016-08-19 22:39:34 -07:00
Jason Volk
625fb277ca
Add root exception + basic utilities.
2016-07-25 19:43:26 -07:00
Jason Volk
73297c988b
Preliminary defaults/paths namespacing.
...
The namespace is inline to mimic the C namespace for now.
2016-07-25 16:49:00 -07:00