1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25#ifndef _OCFS2_FS_H
26#define _OCFS2_FS_H
27
28
29#define OCFS2_MAJOR_REV_LEVEL 0
30#define OCFS2_MINOR_REV_LEVEL 90
31
32
33
34
35
36
37
38
39
40
41
42
43#define OCFS2_SUPER_BLOCK_BLKNO 2
44
45
46
47
48
49#define OCFS2_MIN_CLUSTERSIZE 4096
50#define OCFS2_MAX_CLUSTERSIZE 1048576
51
52
53
54
55
56#define OCFS2_MIN_BLOCKSIZE 512
57#define OCFS2_MAX_BLOCKSIZE OCFS2_MIN_CLUSTERSIZE
58
59
60#define OCFS2_SUPER_MAGIC 0x7461636f
61
62
63#define OCFS2_SUPER_BLOCK_SIGNATURE "OCFSV2"
64#define OCFS2_INODE_SIGNATURE "INODE01"
65#define OCFS2_EXTENT_BLOCK_SIGNATURE "EXBLK01"
66#define OCFS2_GROUP_DESC_SIGNATURE "GROUP01"
67
68
69#define OCFS2_HAS_COMPAT_FEATURE(sb,mask) \
70 ( OCFS2_SB(sb)->s_feature_compat & (mask) )
71#define OCFS2_HAS_RO_COMPAT_FEATURE(sb,mask) \
72 ( OCFS2_SB(sb)->s_feature_ro_compat & (mask) )
73#define OCFS2_HAS_INCOMPAT_FEATURE(sb,mask) \
74 ( OCFS2_SB(sb)->s_feature_incompat & (mask) )
75#define OCFS2_SET_COMPAT_FEATURE(sb,mask) \
76 OCFS2_SB(sb)->s_feature_compat |= (mask)
77#define OCFS2_SET_RO_COMPAT_FEATURE(sb,mask) \
78 OCFS2_SB(sb)->s_feature_ro_compat |= (mask)
79#define OCFS2_SET_INCOMPAT_FEATURE(sb,mask) \
80 OCFS2_SB(sb)->s_feature_incompat |= (mask)
81#define OCFS2_CLEAR_COMPAT_FEATURE(sb,mask) \
82 OCFS2_SB(sb)->s_feature_compat &= ~(mask)
83#define OCFS2_CLEAR_RO_COMPAT_FEATURE(sb,mask) \
84 OCFS2_SB(sb)->s_feature_ro_compat &= ~(mask)
85#define OCFS2_CLEAR_INCOMPAT_FEATURE(sb,mask) \
86 OCFS2_SB(sb)->s_feature_incompat &= ~(mask)
87
88#define OCFS2_FEATURE_COMPAT_SUPP OCFS2_FEATURE_COMPAT_BACKUP_SB
89#define OCFS2_FEATURE_INCOMPAT_SUPP (OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT \
90 | OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC \
91 | OCFS2_FEATURE_INCOMPAT_INLINE_DATA)
92#define OCFS2_FEATURE_RO_COMPAT_SUPP OCFS2_FEATURE_RO_COMPAT_UNWRITTEN
93
94
95
96
97
98
99#define OCFS2_FEATURE_INCOMPAT_HEARTBEAT_DEV 0x0002
100
101
102
103
104
105
106#define OCFS2_FEATURE_INCOMPAT_RESIZE_INPROG 0x0004
107
108
109#define OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT 0x0008
110
111
112#define OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC 0x0010
113
114
115
116
117
118
119
120
121
122
123#define OCFS2_FEATURE_INCOMPAT_TUNEFS_INPROG 0x0020
124
125
126#define OCFS2_FEATURE_INCOMPAT_INLINE_DATA 0x0040
127
128
129
130
131
132#define OCFS2_FEATURE_COMPAT_BACKUP_SB 0x0001
133
134
135
136
137#define OCFS2_FEATURE_RO_COMPAT_UNWRITTEN 0x0001
138
139
140
141
142#define OCFS2_BACKUP_SB_START 1 << 30
143
144
145#define OCFS2_MAX_BACKUP_SUPERBLOCKS 6
146
147
148
149
150#define OCFS2_TUNEFS_INPROG_REMOVE_SLOT 0x0001
151
152
153
154
155#define OCFS2_VALID_FL (0x00000001)
156#define OCFS2_UNUSED2_FL (0x00000002)
157#define OCFS2_ORPHANED_FL (0x00000004)
158#define OCFS2_UNUSED3_FL (0x00000008)
159
160#define OCFS2_SYSTEM_FL (0x00000010)
161#define OCFS2_SUPER_BLOCK_FL (0x00000020)
162#define OCFS2_LOCAL_ALLOC_FL (0x00000040)
163#define OCFS2_BITMAP_FL (0x00000080)
164#define OCFS2_JOURNAL_FL (0x00000100)
165#define OCFS2_HEARTBEAT_FL (0x00000200)
166#define OCFS2_CHAIN_FL (0x00000400)
167#define OCFS2_DEALLOC_FL (0x00000800)
168
169
170
171
172
173
174
175#define OCFS2_INLINE_DATA_FL (0x0001)
176#define OCFS2_HAS_XATTR_FL (0x0002)
177#define OCFS2_INLINE_XATTR_FL (0x0004)
178#define OCFS2_INDEXED_DIR_FL (0x0008)
179
180
181#define OCFS2_SECRM_FL (0x00000001)
182#define OCFS2_UNRM_FL (0x00000002)
183#define OCFS2_COMPR_FL (0x00000004)
184#define OCFS2_SYNC_FL (0x00000008)
185#define OCFS2_IMMUTABLE_FL (0x00000010)
186#define OCFS2_APPEND_FL (0x00000020)
187#define OCFS2_NODUMP_FL (0x00000040)
188#define OCFS2_NOATIME_FL (0x00000080)
189#define OCFS2_DIRSYNC_FL (0x00010000)
190
191#define OCFS2_FL_VISIBLE (0x000100FF)
192#define OCFS2_FL_MODIFIABLE (0x000100FF)
193
194
195
196
197#define OCFS2_EXT_UNWRITTEN (0x01)
198
199
200
201
202
203#define OCFS2_IOC_GETFLAGS _IOR('f', 1, long)
204#define OCFS2_IOC_SETFLAGS _IOW('f', 2, long)
205#define OCFS2_IOC32_GETFLAGS _IOR('f', 1, int)
206#define OCFS2_IOC32_SETFLAGS _IOW('f', 2, int)
207
208
209
210
211
212
213
214
215struct ocfs2_space_resv {
216 __s16 l_type;
217 __s16 l_whence;
218 __s64 l_start;
219 __s64 l_len;
220 __s32 l_sysid;
221 __u32 l_pid;
222 __s32 l_pad[4];
223};
224
225#define OCFS2_IOC_ALLOCSP _IOW ('X', 10, struct ocfs2_space_resv)
226#define OCFS2_IOC_FREESP _IOW ('X', 11, struct ocfs2_space_resv)
227#define OCFS2_IOC_RESVSP _IOW ('X', 40, struct ocfs2_space_resv)
228#define OCFS2_IOC_UNRESVSP _IOW ('X', 41, struct ocfs2_space_resv)
229#define OCFS2_IOC_ALLOCSP64 _IOW ('X', 36, struct ocfs2_space_resv)
230#define OCFS2_IOC_FREESP64 _IOW ('X', 37, struct ocfs2_space_resv)
231#define OCFS2_IOC_RESVSP64 _IOW ('X', 42, struct ocfs2_space_resv)
232#define OCFS2_IOC_UNRESVSP64 _IOW ('X', 43, struct ocfs2_space_resv)
233
234
235
236
237#define OCFS2_JOURNAL_DIRTY_FL (0x00000001)
238
239
240
241
242#define OCFS2_ERROR_FS (0x00000001)
243
244
245#define OCFS2_MAX_FILENAME_LEN 255
246
247
248#define OCFS2_MAX_SLOTS 255
249
250
251#define OCFS2_INVALID_SLOT -1
252
253#define OCFS2_VOL_UUID_LEN 16
254#define OCFS2_MAX_VOL_LABEL_LEN 64
255
256
257#define OCFS2_MIN_JOURNAL_SIZE (4 * 1024 * 1024)
258
259struct ocfs2_system_inode_info {
260 char *si_name;
261 int si_iflags;
262 int si_mode;
263};
264
265
266enum {
267 BAD_BLOCK_SYSTEM_INODE = 0,
268 GLOBAL_INODE_ALLOC_SYSTEM_INODE,
269 SLOT_MAP_SYSTEM_INODE,
270#define OCFS2_FIRST_ONLINE_SYSTEM_INODE SLOT_MAP_SYSTEM_INODE
271 HEARTBEAT_SYSTEM_INODE,
272 GLOBAL_BITMAP_SYSTEM_INODE,
273#define OCFS2_LAST_GLOBAL_SYSTEM_INODE GLOBAL_BITMAP_SYSTEM_INODE
274 ORPHAN_DIR_SYSTEM_INODE,
275 EXTENT_ALLOC_SYSTEM_INODE,
276 INODE_ALLOC_SYSTEM_INODE,
277 JOURNAL_SYSTEM_INODE,
278 LOCAL_ALLOC_SYSTEM_INODE,
279 TRUNCATE_LOG_SYSTEM_INODE,
280 NUM_SYSTEM_INODES
281};
282
283static struct ocfs2_system_inode_info ocfs2_system_inodes[NUM_SYSTEM_INODES] = {
284
285
286 [BAD_BLOCK_SYSTEM_INODE] = { "bad_blocks", 0, S_IFREG | 0644 },
287 [GLOBAL_INODE_ALLOC_SYSTEM_INODE] = { "global_inode_alloc", OCFS2_BITMAP_FL | OCFS2_CHAIN_FL, S_IFREG | 0644 },
288
289
290 [SLOT_MAP_SYSTEM_INODE] = { "slot_map", 0, S_IFREG | 0644 },
291 [HEARTBEAT_SYSTEM_INODE] = { "heartbeat", OCFS2_HEARTBEAT_FL, S_IFREG | 0644 },
292 [GLOBAL_BITMAP_SYSTEM_INODE] = { "global_bitmap", 0, S_IFREG | 0644 },
293
294
295 [ORPHAN_DIR_SYSTEM_INODE] = { "orphan_dir:%04d", 0, S_IFDIR | 0755 },
296 [EXTENT_ALLOC_SYSTEM_INODE] = { "extent_alloc:%04d", OCFS2_BITMAP_FL | OCFS2_CHAIN_FL, S_IFREG | 0644 },
297 [INODE_ALLOC_SYSTEM_INODE] = { "inode_alloc:%04d", OCFS2_BITMAP_FL | OCFS2_CHAIN_FL, S_IFREG | 0644 },
298 [JOURNAL_SYSTEM_INODE] = { "journal:%04d", OCFS2_JOURNAL_FL, S_IFREG | 0644 },
299 [LOCAL_ALLOC_SYSTEM_INODE] = { "local_alloc:%04d", OCFS2_BITMAP_FL | OCFS2_LOCAL_ALLOC_FL, S_IFREG | 0644 },
300 [TRUNCATE_LOG_SYSTEM_INODE] = { "truncate_log:%04d", OCFS2_DEALLOC_FL, S_IFREG | 0644 }
301};
302
303
304#define OCFS2_HB_NONE "heartbeat=none"
305#define OCFS2_HB_LOCAL "heartbeat=local"
306
307
308
309
310
311#define OCFS2_FT_UNKNOWN 0
312#define OCFS2_FT_REG_FILE 1
313#define OCFS2_FT_DIR 2
314#define OCFS2_FT_CHRDEV 3
315#define OCFS2_FT_BLKDEV 4
316#define OCFS2_FT_FIFO 5
317#define OCFS2_FT_SOCK 6
318#define OCFS2_FT_SYMLINK 7
319
320#define OCFS2_FT_MAX 8
321
322
323
324
325
326
327#define OCFS2_DIR_PAD 4
328#define OCFS2_DIR_ROUND (OCFS2_DIR_PAD - 1)
329#define OCFS2_DIR_MEMBER_LEN offsetof(struct ocfs2_dir_entry, name)
330#define OCFS2_DIR_REC_LEN(name_len) (((name_len) + OCFS2_DIR_MEMBER_LEN + \
331 OCFS2_DIR_ROUND) & \
332 ~OCFS2_DIR_ROUND)
333
334#define OCFS2_LINK_MAX 32000
335
336#define S_SHIFT 12
337static unsigned char ocfs2_type_by_mode[S_IFMT >> S_SHIFT] = {
338 [S_IFREG >> S_SHIFT] = OCFS2_FT_REG_FILE,
339 [S_IFDIR >> S_SHIFT] = OCFS2_FT_DIR,
340 [S_IFCHR >> S_SHIFT] = OCFS2_FT_CHRDEV,
341 [S_IFBLK >> S_SHIFT] = OCFS2_FT_BLKDEV,
342 [S_IFIFO >> S_SHIFT] = OCFS2_FT_FIFO,
343 [S_IFSOCK >> S_SHIFT] = OCFS2_FT_SOCK,
344 [S_IFLNK >> S_SHIFT] = OCFS2_FT_SYMLINK,
345};
346
347
348
349
350
351#define OCFS2_RAW_SB(dinode) (&((dinode)->id2.i_super))
352
353
354
355
356
357
358
359
360struct ocfs2_extent_rec {
361 __le32 e_cpos;
362 union {
363 __le32 e_int_clusters;
364 struct {
365 __le16 e_leaf_clusters;
366
367 __u8 e_reserved1;
368 __u8 e_flags;
369 };
370 };
371 __le64 e_blkno;
372
373};
374
375struct ocfs2_chain_rec {
376 __le32 c_free;
377 __le32 c_total;
378 __le64 c_blkno;
379};
380
381struct ocfs2_truncate_rec {
382 __le32 t_start;
383 __le32 t_clusters;
384};
385
386
387
388
389
390
391
392struct ocfs2_extent_list {
393 __le16 l_tree_depth;
394
395
396
397
398
399
400 __le16 l_count;
401 __le16 l_next_free_rec;
402 __le16 l_reserved1;
403 __le64 l_reserved2;
404
405 struct ocfs2_extent_rec l_recs[0];
406};
407
408
409
410
411
412
413struct ocfs2_chain_list {
414 __le16 cl_cpg;
415 __le16 cl_bpc;
416 __le16 cl_count;
417 __le16 cl_next_free_rec;
418 __le64 cl_reserved1;
419 struct ocfs2_chain_rec cl_recs[0];
420};
421
422
423
424
425
426
427struct ocfs2_truncate_log {
428 __le16 tl_count;
429 __le16 tl_used;
430 __le32 tl_reserved1;
431 struct ocfs2_truncate_rec tl_recs[0];
432};
433
434
435
436
437struct ocfs2_extent_block
438{
439 __u8 h_signature[8];
440 __le64 h_reserved1;
441 __le16 h_suballoc_slot;
442
443 __le16 h_suballoc_bit;
444
445 __le32 h_fs_generation;
446 __le64 h_blkno;
447 __le64 h_reserved3;
448 __le64 h_next_leaf_blk;
449
450
451 struct ocfs2_extent_list h_list;
452
453};
454
455
456
457
458
459
460struct ocfs2_super_block {
461 __le16 s_major_rev_level;
462 __le16 s_minor_rev_level;
463 __le16 s_mnt_count;
464 __le16 s_max_mnt_count;
465 __le16 s_state;
466 __le16 s_errors;
467 __le32 s_checkinterval;
468 __le64 s_lastcheck;
469 __le32 s_creator_os;
470 __le32 s_feature_compat;
471 __le32 s_feature_incompat;
472 __le32 s_feature_ro_compat;
473 __le64 s_root_blkno;
474
475 __le64 s_system_dir_blkno;
476
477 __le32 s_blocksize_bits;
478 __le32 s_clustersize_bits;
479 __le16 s_max_slots;
480
481 __le16 s_tunefs_flag;
482 __le32 s_reserved1;
483 __le64 s_first_cluster_group;
484
485 __u8 s_label[OCFS2_MAX_VOL_LABEL_LEN];
486 __u8 s_uuid[OCFS2_VOL_UUID_LEN];
487
488};
489
490
491
492
493
494
495struct ocfs2_local_alloc
496{
497 __le32 la_bm_off;
498 __le16 la_size;
499 __le16 la_reserved1;
500 __le64 la_reserved2;
501 __u8 la_bitmap[0];
502};
503
504
505
506
507
508struct ocfs2_inline_data
509{
510 __le16 id_count;
511
512 __le16 id_reserved0;
513 __le32 id_reserved1;
514 __u8 id_data[0];
515};
516
517
518
519
520struct ocfs2_dinode {
521 __u8 i_signature[8];
522 __le32 i_generation;
523 __le16 i_suballoc_slot;
524
525 __le16 i_suballoc_bit;
526
527 __le32 i_reserved0;
528 __le32 i_clusters;
529 __le32 i_uid;
530 __le32 i_gid;
531 __le64 i_size;
532 __le16 i_mode;
533 __le16 i_links_count;
534 __le32 i_flags;
535 __le64 i_atime;
536 __le64 i_ctime;
537 __le64 i_mtime;
538 __le64 i_dtime;
539 __le64 i_blkno;
540 __le64 i_last_eb_blk;
541
542 __le32 i_fs_generation;
543 __le32 i_atime_nsec;
544 __le32 i_ctime_nsec;
545 __le32 i_mtime_nsec;
546 __le32 i_attr;
547 __le16 i_orphaned_slot;
548
549 __le16 i_dyn_features;
550 __le64 i_reserved2[8];
551 union {
552 __le64 i_pad1;
553
554 struct {
555 __le64 i_rdev;
556 } dev1;
557 struct {
558
559 __le32 i_used;
560 __le32 i_total;
561
562 } bitmap1;
563 struct {
564
565 __le32 ij_flags;
566 __le32 ij_pad;
567 } journal1;
568 } id1;
569 union {
570 struct ocfs2_super_block i_super;
571 struct ocfs2_local_alloc i_lab;
572 struct ocfs2_chain_list i_chain;
573 struct ocfs2_extent_list i_list;
574 struct ocfs2_truncate_log i_dealloc;
575 struct ocfs2_inline_data i_data;
576 __u8 i_symlink[0];
577 } id2;
578
579};
580
581
582
583
584
585
586struct ocfs2_dir_entry {
587 __le64 inode;
588 __le16 rec_len;
589 __u8 name_len;
590 __u8 file_type;
591 char name[OCFS2_MAX_FILENAME_LEN];
592
593} __attribute__ ((packed));
594
595
596
597
598struct ocfs2_group_desc
599{
600 __u8 bg_signature[8];
601 __le16 bg_size;
602
603 __le16 bg_bits;
604
605 __le16 bg_free_bits_count;
606 __le16 bg_chain;
607 __le32 bg_generation;
608 __le32 bg_reserved1;
609 __le64 bg_next_group;
610
611 __le64 bg_parent_dinode;
612
613 __le64 bg_blkno;
614 __le64 bg_reserved2[2];
615 __u8 bg_bitmap[0];
616};
617
618#ifdef __KERNEL__
619static inline int ocfs2_fast_symlink_chars(struct super_block *sb)
620{
621 return sb->s_blocksize -
622 offsetof(struct ocfs2_dinode, id2.i_symlink);
623}
624
625static inline int ocfs2_max_inline_data(struct super_block *sb)
626{
627 return sb->s_blocksize -
628 offsetof(struct ocfs2_dinode, id2.i_data.id_data);
629}
630
631static inline int ocfs2_extent_recs_per_inode(struct super_block *sb)
632{
633 int size;
634
635 size = sb->s_blocksize -
636 offsetof(struct ocfs2_dinode, id2.i_list.l_recs);
637
638 return size / sizeof(struct ocfs2_extent_rec);
639}
640
641static inline int ocfs2_chain_recs_per_inode(struct super_block *sb)
642{
643 int size;
644
645 size = sb->s_blocksize -
646 offsetof(struct ocfs2_dinode, id2.i_chain.cl_recs);
647
648 return size / sizeof(struct ocfs2_chain_rec);
649}
650
651static inline u16 ocfs2_extent_recs_per_eb(struct super_block *sb)
652{
653 int size;
654
655 size = sb->s_blocksize -
656 offsetof(struct ocfs2_extent_block, h_list.l_recs);
657
658 return size / sizeof(struct ocfs2_extent_rec);
659}
660
661static inline u16 ocfs2_local_alloc_size(struct super_block *sb)
662{
663 u16 size;
664
665 size = sb->s_blocksize -
666 offsetof(struct ocfs2_dinode, id2.i_lab.la_bitmap);
667
668 return size;
669}
670
671static inline int ocfs2_group_bitmap_size(struct super_block *sb)
672{
673 int size;
674
675 size = sb->s_blocksize -
676 offsetof(struct ocfs2_group_desc, bg_bitmap);
677
678 return size;
679}
680
681static inline int ocfs2_truncate_recs_per_inode(struct super_block *sb)
682{
683 int size;
684
685 size = sb->s_blocksize -
686 offsetof(struct ocfs2_dinode, id2.i_dealloc.tl_recs);
687
688 return size / sizeof(struct ocfs2_truncate_rec);
689}
690
691static inline u64 ocfs2_backup_super_blkno(struct super_block *sb, int index)
692{
693 u64 offset = OCFS2_BACKUP_SB_START;
694
695 if (index >= 0 && index < OCFS2_MAX_BACKUP_SUPERBLOCKS) {
696 offset <<= (2 * index);
697 offset >>= sb->s_blocksize_bits;
698 return offset;
699 }
700
701 return 0;
702
703}
704#else
705static inline int ocfs2_fast_symlink_chars(int blocksize)
706{
707 return blocksize - offsetof(struct ocfs2_dinode, id2.i_symlink);
708}
709
710static inline int ocfs2_max_inline_data(int blocksize)
711{
712 return blocksize - offsetof(struct ocfs2_dinode, id2.i_data.id_data);
713}
714
715static inline int ocfs2_extent_recs_per_inode(int blocksize)
716{
717 int size;
718
719 size = blocksize -
720 offsetof(struct ocfs2_dinode, id2.i_list.l_recs);
721
722 return size / sizeof(struct ocfs2_extent_rec);
723}
724
725static inline int ocfs2_chain_recs_per_inode(int blocksize)
726{
727 int size;
728
729 size = blocksize -
730 offsetof(struct ocfs2_dinode, id2.i_chain.cl_recs);
731
732 return size / sizeof(struct ocfs2_chain_rec);
733}
734
735static inline int ocfs2_extent_recs_per_eb(int blocksize)
736{
737 int size;
738
739 size = blocksize -
740 offsetof(struct ocfs2_extent_block, h_list.l_recs);
741
742 return size / sizeof(struct ocfs2_extent_rec);
743}
744
745static inline int ocfs2_local_alloc_size(int blocksize)
746{
747 int size;
748
749 size = blocksize -
750 offsetof(struct ocfs2_dinode, id2.i_lab.la_bitmap);
751
752 return size;
753}
754
755static inline int ocfs2_group_bitmap_size(int blocksize)
756{
757 int size;
758
759 size = blocksize -
760 offsetof(struct ocfs2_group_desc, bg_bitmap);
761
762 return size;
763}
764
765static inline int ocfs2_truncate_recs_per_inode(int blocksize)
766{
767 int size;
768
769 size = blocksize -
770 offsetof(struct ocfs2_dinode, id2.i_dealloc.tl_recs);
771
772 return size / sizeof(struct ocfs2_truncate_rec);
773}
774
775static inline uint64_t ocfs2_backup_super_blkno(int blocksize, int index)
776{
777 uint64_t offset = OCFS2_BACKUP_SB_START;
778
779 if (index >= 0 && index < OCFS2_MAX_BACKUP_SUPERBLOCKS) {
780 offset <<= (2 * index);
781 offset /= blocksize;
782 return offset;
783 }
784
785 return 0;
786}
787#endif
788
789
790static inline int ocfs2_system_inode_is_global(int type)
791{
792 return ((type >= 0) &&
793 (type <= OCFS2_LAST_GLOBAL_SYSTEM_INODE));
794}
795
796static inline int ocfs2_sprintf_system_inode_name(char *buf, int len,
797 int type, int slot)
798{
799 int chars;
800
801
802
803
804
805
806 if (type <= OCFS2_LAST_GLOBAL_SYSTEM_INODE)
807 chars = snprintf(buf, len,
808 ocfs2_system_inodes[type].si_name);
809 else
810 chars = snprintf(buf, len,
811 ocfs2_system_inodes[type].si_name,
812 slot);
813
814 return chars;
815}
816
817static inline void ocfs2_set_de_type(struct ocfs2_dir_entry *de,
818 umode_t mode)
819{
820 de->file_type = ocfs2_type_by_mode[(mode & S_IFMT)>>S_SHIFT];
821}
822
823#endif
824
825