diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-12-20 08:23:49 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-12-20 08:28:23 +0100 |
commit | ab834d65e4a96bb59901f4349857ffe3e57a3f54 (patch) | |
tree | aef400bbba99f58d28ee19b8ffee0ed31b6cbbc8 /cpukit/libfs/src/jffs2/include/rtems/jffs2.h | |
parent | JFFS2: Add RTEMS_JFFS2_FORCE_GARBAGE_COLLECTION (diff) | |
download | rtems-ab834d65e4a96bb59901f4349857ffe3e57a3f54.tar.bz2 |
JFFS2: RTEMS_JFFS2_ON_DEMAND_GARBAGE_COLLECTION
Update #2844.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libfs/src/jffs2/include/rtems/jffs2.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/cpukit/libfs/src/jffs2/include/rtems/jffs2.h b/cpukit/libfs/src/jffs2/include/rtems/jffs2.h index 11735cbb09..b786415b68 100644 --- a/cpukit/libfs/src/jffs2/include/rtems/jffs2.h +++ b/cpukit/libfs/src/jffs2/include/rtems/jffs2.h @@ -230,6 +230,20 @@ typedef void (*rtems_jffs2_flash_destroy)( ); /** + * @brief Trigger garbage collection operation. + * + * An optional garbage collection thread may perform now a garbage collection + * using the RTEMS_JFFS2_ON_DEMAND_GARBAGE_COLLECTION IO control. + * + * The garbage collection must not run in the executing context. + * + * @param[in] self The flash control. + */ +typedef void (*rtems_jffs2_trigger_garbage_collection)( + rtems_jffs2_flash_control *self +); + +/** * @brief JFFS2 flash device control. */ struct rtems_jffs2_flash_control { @@ -275,6 +289,15 @@ struct rtems_jffs2_flash_control { * file system node in the system. */ dev_t device_identifier; + + /** + * @brief Trigger garbage collection operation. + * + * This operation is optional and may be NULL. This operation should wake up + * a garbage collection thread. The garbage collection thread should use the + * RTEMS_JFFS2_ON_DEMAND_GARBAGE_COLLECTION IO control to carry out the work. + */ + rtems_jffs2_trigger_garbage_collection trigger_garbage_collection; }; typedef struct rtems_jffs2_compressor_control rtems_jffs2_compressor_control; @@ -556,6 +579,15 @@ typedef struct { #define RTEMS_JFFS2_GET_INFO _IOR('F', 1, rtems_jffs2_info) /** + * @brief IO control to perform an on demand garbage collection in a JFFS2 + * filesystem instance. + * + * This operation is intended to be used by an optional garbage collection + * thread. See rtems_jffs2_flash_control::trigger_garbage_collection. + */ +#define RTEMS_JFFS2_ON_DEMAND_GARBAGE_COLLECTION _IO('F', 2) + +/** * @brief IO control to force a garbage collection in a JFFS2 filesystem * instance. * |