8
8
9
9
#include <linux/mutex.h>
10
10
#include <linux/sched.h>
11
+ #include <linux/stddef.h>
11
12
#include <linux/types.h>
12
13
#include <linux/wait.h>
13
14
@@ -73,7 +74,7 @@ enum uds_request_type {
73
74
/* Remove any mapping for a name. */
74
75
UDS_DELETE ,
75
76
76
- };
77
+ } __packed ;
77
78
78
79
enum uds_open_index_type {
79
80
/* Create a new index. */
@@ -226,7 +227,7 @@ struct uds_zone_message {
226
227
enum uds_zone_message_type type ;
227
228
/* The virtual chapter number to which the message applies */
228
229
u64 virtual_chapter ;
229
- };
230
+ } __packed ;
230
231
231
232
struct uds_index_session ;
232
233
struct uds_index ;
@@ -253,34 +254,32 @@ struct uds_request {
253
254
254
255
/* The existing data associated with the request name, if any */
255
256
struct uds_record_data old_metadata ;
256
- /* Either UDS_SUCCESS or an error code for the request */
257
- int status ;
258
257
/* True if the record name had an existing entry in the index */
259
258
bool found ;
259
+ /* Either UDS_SUCCESS or an error code for the request */
260
+ int status ;
260
261
261
- /*
262
- * The remaining fields are used internally and should not be altered by clients. The index
263
- * relies on zone_number being the first field in this section.
264
- */
265
-
266
- /* The number of the zone which will process this request*/
267
- unsigned int zone_number ;
268
- /* A link for adding a request to a lock-free queue */
269
- struct funnel_queue_entry queue_link ;
270
- /* A link for adding a request to a standard linked list */
271
- struct uds_request * next_request ;
272
- /* A pointer to the index processing this request */
273
- struct uds_index * index ;
274
- /* Control message for coordinating between zones */
275
- struct uds_zone_message zone_message ;
276
- /* If true, process request immediately by waking the worker thread */
277
- bool unbatched ;
278
- /* If true, continue this request before processing newer requests */
279
- bool requeued ;
280
- /* The virtual chapter containing the record name, if known */
281
- u64 virtual_chapter ;
282
- /* The region of the index containing the record name */
283
- enum uds_index_region location ;
262
+ /* The remaining fields are used internally and should not be altered by clients. */
263
+ struct_group (internal ,
264
+ /* The virtual chapter containing the record name, if known */
265
+ u64 virtual_chapter ;
266
+ /* The region of the index containing the record name */
267
+ enum uds_index_region location ;
268
+ /* If true, process request immediately by waking the worker thread */
269
+ bool unbatched ;
270
+ /* If true, continue this request before processing newer requests */
271
+ bool requeued ;
272
+ /* Control message for coordinating between zones */
273
+ struct uds_zone_message zone_message ;
274
+ /* The number of the zone which will process this request*/
275
+ unsigned int zone_number ;
276
+ /* A link for adding a request to a lock-free queue */
277
+ struct funnel_queue_entry queue_link ;
278
+ /* A link for adding a request to a standard linked list */
279
+ struct uds_request * next_request ;
280
+ /* A pointer to the index processing this request */
281
+ struct uds_index * index ;
282
+ );
284
283
};
285
284
286
285
/* A session is required for most index operations. */
0 commit comments