367
363
minimizes the impact on the systme performance
368
364
while file system's inode table is being initialized.
370
discard Controls whether ext4 should issue discard/TRIM
366
discard Controls whether ext4 should issue discard/TRIM
371
367
nodiscard(*) commands to the underlying block device when
372
368
blocks are freed. This is useful for SSD devices
373
369
and sparse/thinly-provisioned LUNs, but it is off
374
370
by default until sufficient testing has been done.
372
nouid32 Disables 32-bit UIDs and GIDs. This is for
373
interoperability with older kernels which only
374
store and expect 16-bit values.
376
resize Allows to resize filesystem to the end of the last
377
existing block group, further resize has to be done
378
with resize2fs either online, or offline. It can be
379
used only with conjunction with remount.
381
block_validity This options allows to enables/disables the in-kernel
382
noblock_validity facility for tracking filesystem metadata blocks
383
within internal data structures. This allows multi-
384
block allocator and other routines to quickly locate
385
extents which might overlap with filesystem metadata
386
blocks. This option is intended for debugging
387
purposes and since it negatively affects the
388
performance, it is off by default.
390
dioread_lock Controls whether or not ext4 should use the DIO read
391
dioread_nolock locking. If the dioread_nolock option is specified
392
ext4 will allocate uninitialized extent before buffer
393
write and convert the extent to initialized after IO
394
completes. This approach allows ext4 code to avoid
395
using inode mutex, which improves scalability on high
396
speed storages. However this does not work with nobh
397
option and the mount will fail. Nor does it work with
398
data journaling and dioread_nolock option will be
399
ignored with kernel warning. Note that dioread_nolock
400
code path is only used for extent-based files.
401
Because of the restrictions this options comprises
402
it is off by default (e.g. dioread_lock).
404
i_version Enable 64-bit inode version support. This option is
378
409
There are 3 different data modes:
400
431
outperforms all others modes. Currently ext4 does not have delayed
401
432
allocation support if this data journalling mode is selected.
437
Information about mounted ext4 file systems can be found in
438
/proc/fs/ext4. Each mounted filesystem will have a directory in
439
/proc/fs/ext4 based on its device name (i.e., /proc/fs/ext4/hdc or
440
/proc/fs/ext4/dm-0). The files in each per-device directory are shown
443
Files in /proc/fs/ext4/<devname>
444
..............................................................................
446
mb_groups details of multiblock allocator buddy cache of free blocks
447
..............................................................................
452
Information about mounted ext4 file systems can be found in
453
/sys/fs/ext4. Each mounted filesystem will have a directory in
454
/sys/fs/ext4 based on its device name (i.e., /sys/fs/ext4/hdc or
455
/sys/fs/ext4/dm-0). The files in each per-device directory are shown
458
Files in /sys/fs/ext4/<devname>
459
(see also Documentation/ABI/testing/sysfs-fs-ext4)
460
..............................................................................
463
delayed_allocation_blocks This file is read-only and shows the number of
464
blocks that are dirty in the page cache, but
465
which do not have their location in the
466
filesystem allocated yet.
468
inode_goal Tuning parameter which (if non-zero) controls
469
the goal inode used by the inode allocator in
470
preference to all other allocation heuristics.
471
This is intended for debugging use only, and
472
should be 0 on production systems.
474
inode_readahead_blks Tuning parameter which controls the maximum
475
number of inode table blocks that ext4's inode
476
table readahead algorithm will pre-read into
479
lifetime_write_kbytes This file is read-only and shows the number of
480
kilobytes of data that have been written to this
481
filesystem since it was created.
483
max_writeback_mb_bump The maximum number of megabytes the writeback
484
code will try to write out before move on to
487
mb_group_prealloc The multiblock allocator will round up allocation
488
requests to a multiple of this tuning parameter if
489
the stripe size is not set in the ext4 superblock
491
mb_max_to_scan The maximum number of extents the multiblock
492
allocator will search to find the best extent
494
mb_min_to_scan The minimum number of extents the multiblock
495
allocator will search to find the best extent
497
mb_order2_req Tuning parameter which controls the minimum size
498
for requests (as a power of 2) where the buddy
501
mb_stats Controls whether the multiblock allocator should
502
collect statistics, which are shown during the
503
unmount. 1 means to collect statistics, 0 means
504
not to collect statistics
506
mb_stream_req Files which have fewer blocks than this tunable
507
parameter will have their blocks allocated out
508
of a block group specific preallocation pool, so
509
that small files are packed closely together.
510
Each large file will have its blocks allocated
511
out of its own unique preallocation pool.
513
session_write_kbytes This file is read-only and shows the number of
514
kilobytes of data that have been written to this
515
filesystem since it was mounted.
516
..............................................................................
521
There is some Ext4 specific functionality which can be accessed by applications
522
through the system call interfaces. The list of all Ext4 specific ioctls are
523
shown in the table below.
525
Table of Ext4 specific ioctls
526
..............................................................................
528
EXT4_IOC_GETFLAGS Get additional attributes associated with inode.
529
The ioctl argument is an integer bitfield, with
530
bit values described in ext4.h. This ioctl is an
531
alias for FS_IOC_GETFLAGS.
533
EXT4_IOC_SETFLAGS Set additional attributes associated with inode.
534
The ioctl argument is an integer bitfield, with
535
bit values described in ext4.h. This ioctl is an
536
alias for FS_IOC_SETFLAGS.
539
EXT4_IOC_GETVERSION_OLD
540
Get the inode i_generation number stored for
541
each inode. The i_generation number is normally
542
changed only when new inode is created and it is
543
particularly useful for network filesystems. The
544
'_OLD' version of this ioctl is an alias for
548
EXT4_IOC_SETVERSION_OLD
549
Set the inode i_generation number stored for
550
each inode. The '_OLD' version of this ioctl
551
is an alias for FS_IOC_SETVERSION.
553
EXT4_IOC_GROUP_EXTEND This ioctl has the same purpose as the resize
554
mount option. It allows to resize filesystem
555
to the end of the last existing block group,
556
further resize has to be done with resize2fs,
557
either online, or offline. The argument points
558
to the unsigned logn number representing the
559
filesystem new block count.
561
EXT4_IOC_MOVE_EXT Move the block extents from orig_fd (the one
562
this ioctl is pointing to) to the donor_fd (the
563
one specified in move_extent structure passed
564
as an argument to this ioctl). Then, exchange
565
inode metadata between orig_fd and donor_fd.
566
This is especially useful for online
567
defragmentation, because the allocator has the
568
opportunity to allocate moved blocks better,
569
ideally into one contiguous extent.
571
EXT4_IOC_GROUP_ADD Add a new group descriptor to an existing or
572
new group descriptor block. The new group
573
descriptor is described by ext4_new_group_input
574
structure, which is passed as an argument to
575
this ioctl. This is especially useful in
576
conjunction with EXT4_IOC_GROUP_EXTEND,
577
which allows online resize of the filesystem
578
to the end of the last existing block group.
579
Those two ioctls combined is used in userspace
580
online resize tool (e.g. resize2fs).
582
EXT4_IOC_MIGRATE This ioctl operates on the filesystem itself.
583
It converts (migrates) ext3 indirect block mapped
584
inode to ext4 extent mapped inode by walking
585
through indirect block mapping of the original
586
inode and converting contiguous block ranges
587
into ext4 extents of the temporary inode. Then,
588
inodes are swapped. This ioctl might help, when
589
migrating from ext3 to ext4 filesystem, however
590
suggestion is to create fresh ext4 filesystem
591
and copy data from the backup. Note, that
592
filesystem has to support extents for this ioctl
595
EXT4_IOC_ALLOC_DA_BLKS Force all of the delay allocated blocks to be
596
allocated to preserve application-expected ext3
597
behaviour. Note that this will also start
598
triggering a write of the data blocks, but this
599
behaviour may change in the future as it is
600
not necessary and has been done this way only
601
for sake of simplicity.
602
..............................................................................