mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-11-25 09:41:43 +08:00
930dad31de
* Replace the stat values with a crc32b of them instead (for auto-cache) * Replace char flag with bitfield * Remove node generation. nodeid is an unsigned 64bit int. Would take 500K+ years to rollover at 1M nodes per second.
33 lines
1.1 KiB
C
33 lines
1.1 KiB
C
/*
|
|
ISC License
|
|
|
|
Copyright (c) 2021, Antonio SJ Musumeci <trapexit@spawn.link>
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
|
|
#ifndef CRC32B_H_INCLUDED
|
|
#define CRC32B_H_INCLUDED
|
|
|
|
typedef unsigned int crc32b_t;
|
|
|
|
crc32b_t crc32b_start(void);
|
|
crc32b_t crc32b_continue(const void *buf,
|
|
const crc32b_t len,
|
|
const crc32b_t crc);
|
|
crc32b_t crc32b_finish(const crc32b_t crc);
|
|
|
|
crc32b_t crc32b(const void *buf, crc32b_t len);
|
|
|
|
#endif
|