Skip to content

Commit

Permalink
Merge android-4.14.171 (998aa7d) into msm-4.14
Browse files Browse the repository at this point in the history
* refs/heads/tmp-998aa7d:
  Reverting crypto and incrementalfs changes
  ANDROID: cuttlefish_defconfig: Enable CONFIG_NET_NS
  ANDROID: virtio: virtio_input: pass _DIRECT only if the device advertises _DIRECT
  ANDROID: net: bpf: Allow TC programs to call BPF_FUNC_skb_change_head
  ANDROID: Add INIT_STACK_ALL to the list of Clang-specific options
  Linux 4.14.171
  libertas: make lbs_ibss_join_existing() return error code on rates overflow
  libertas: don't exit from lbs_ibss_join_existing() with RCU read lock held
  mwifiex: Fix possible buffer overflows in mwifiex_cmd_append_vsie_tlv()
  mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status()
  serial: uartps: Move the spinlock after the read of the tx empty
  dm: fix potential for q->make_request_fn NULL pointer
  scsi: megaraid_sas: Do not initiate OCR if controller is not in ready state
  pinctrl: sh-pfc: r8a7778: Fix duplicate SDSELF_B and SD1_CLK_B
  media: i2c: adv748x: Fix unsafe macros
  crypto: atmel-sha - fix error handling when setting hmac key
  crypto: artpec6 - return correct error code for failed setkey()
  KVM: arm/arm64: Fix young bit from mmu notifier
  arm64: cpufeature: Fix the type of no FP/SIMD capability
  ARM: 8949/1: mm: mark free_memmap as __init
  KVM: arm/arm64: vgic-its: Fix restoration of unmapped collections
  powerpc/pseries: Allow not having ibm, hypertas-functions::hcall-multi-tce for DDW
  powerpc/pseries/vio: Fix iommu_table use-after-free refcount warning
  tools/power/acpi: fix compilation error
  ARM: dts: at91: sama5d3: define clock rate range for tcb1
  ARM: dts: at91: sama5d3: fix maximum peripheral clock rates
  platform/x86: intel_mid_powerbtn: Take a copy of ddata
  ARC: [plat-axs10x]: Add missing multicast filter number to GMAC node
  rtc: cmos: Stop using shared IRQ
  rtc: hym8563: Return -EINVAL if the time is known to be invalid
  serial: uartps: Add a timeout to the tx empty wait
  NFSv4: try lease recovery on NFS4ERR_EXPIRED
  NFS/pnfs: Fix pnfs_generic_prepare_to_resend_writes()
  nfs: NFS_SWAP should depend on SWAP
  PCI: Don't disable bridge BARs when assigning bus resources
  PCI/switchtec: Fix vep_vector_number ioread width
  scsi: ufs: Fix ufshcd_probe_hba() reture value in case ufshcd_scsi_add_wlus() fails
  RDMA/netlink: Do not always generate an ACK for some netlink operations
  hv_sock: Remove the accept port restriction
  ASoC: pcm: update FE/BE trigger order based on the command
  rxrpc: Fix service call disconnection
  perf/core: Fix mlock accounting in perf_mmap()
  clocksource: Prevent double add_timer_on() for watchdog_timer
  cifs: fail i/o on soft mounts if sessionsetup errors out
  KVM: s390: do not clobber registers during guest reset/store status
  KVM: Play nice with read-only memslots when querying host page size
  KVM: Use vcpu-specific gva->hva translation when querying host page size
  KVM: nVMX: vmread should not set rflags to specify success in case of #PF
  KVM: VMX: Add non-canonical check on writes to RTIT address MSRs
  KVM: x86/mmu: Apply max PA check for MMIO sptes to 32-bit KVM
  KVM: x86: Fix potential put_fpu() w/o load_fpu() on MPX platform
  btrfs: flush write bio if we loop in extent_write_cache_pages
  KVM: x86: Protect pmu_intel.c from Spectre-v1/L1TF attacks
  drm: atmel-hlcdc: enable clock before configuring timing engine
  Btrfs: fix race between adding and putting tree mod seq elements and nodes
  btrfs: remove trivial locking wrappers of tree mod log
  btrfs: free block groups after free'ing fs trees
  btrfs: use bool argument in free_root_pointers()
  Btrfs: fix missing hole after hole punching and fsync when using NO_HOLES
  Btrfs: fix assertion failure on fsync with NO_HOLES enabled
  btrfs: Get rid of the confusing btrfs_file_extent_inline_len
  ext4: fix deadlock allocating crypto bounce page from mempool
  bonding/alb: properly access headers in bond_alb_xmit()
  net: macb: Limit maximum GEM TX length in TSO
  net: macb: Remove unnecessary alignment check for TSO
  net: systemport: Avoid RBUF stuck in Wake-on-LAN mode
  net_sched: fix a resource leak in tcindex_set_parms()
  net: dsa: bcm_sf2: Only 7278 supports 2Gb/sec IMP port
  mfd: rn5t618: Mark ADC control register volatile
  mfd: da9062: Fix watchdog compatible string
  ubi: Fix an error pointer dereference in error handling code
  ubi: fastmap: Fix inverted logic in seen selfcheck
  nfsd: fix jiffies/time_t mixup in LRU list
  nfsd: fix delay timer on 32-bit architectures
  IB/core: Fix ODP get user pages flow
  IB/mlx5: Fix outstanding_pi index for GSI qps
  net: tulip: Adjust indentation in {dmfe, uli526x}_init_module
  net: smc911x: Adjust indentation in smc911x_phy_configure
  ppp: Adjust indentation into ppp_async_input
  NFC: pn544: Adjust indentation in pn544_hci_check_presence
  powerpc/44x: Adjust indentation in ibm4xx_denali_fixup_memsize
  ext2: Adjust indentation in ext2_fill_super
  phy: qualcomm: Adjust indentation in read_poll_timeout
  scsi: ufs: Recheck bkops level if bkops is disabled
  scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free
  scsi: csiostor: Adjust indentation in csio_device_reset
  scsi: qla2xxx: Fix the endianness of the qla82xx_get_fw_size() return type
  clk: tegra: Mark fuse clock as critical
  KVM: x86: Free wbinvd_dirty_mask if vCPU creation fails
  KVM: PPC: Book3S PR: Free shared page if mmu initialization fails
  KVM: PPC: Book3S HV: Uninit vCPU if vcore creation fails
  KVM: x86: Protect MSR-based index computations in fixed_msr_to_seg_unit() from Spectre-v1/L1TF attacks
  KVM: x86: Protect x86_decode_insn from Spectre-v1/L1TF attacks
  KVM: x86: Protect MSR-based index computations from Spectre-v1/L1TF attacks in x86.c
  KVM: x86: Protect ioapic_read_indirect() from Spectre-v1/L1TF attacks
  KVM: x86: Protect MSR-based index computations in pmu.h from Spectre-v1/L1TF attacks
  KVM: x86: Protect ioapic_write_indirect() from Spectre-v1/L1TF attacks
  KVM: x86: Protect kvm_hv_msr_[get|set]_crash_data() from Spectre-v1/L1TF attacks
  KVM: x86: Protect kvm_lapic_reg_write() from Spectre-v1/L1TF attacks
  KVM: x86: Protect DR-based index computations from Spectre-v1/L1TF attacks
  KVM: x86: Refactor prefix decoding to prevent Spectre-v1/L1TF attacks
  KVM: x86: Refactor picdev_write() to prevent Spectre-v1/L1TF attacks
  xen/balloon: Support xend-based toolstack take two
  tools/kvm_stat: Fix kvm_exit filter name
  sunrpc: expiry_time should be seconds not timeval
  mwifiex: fix unbalanced locking in mwifiex_process_country_ie()
  iwlwifi: don't throw error when trying to remove IGTK
  ARM: tegra: Enable PLLP bypass during Tegra124 LP1
  btrfs: set trans->drity in btrfs_commit_transaction
  NFS: Directory page cache pages need to be locked when read
  NFS: Fix memory leaks and corruption in readdir
  scsi: qla2xxx: Fix unbound NVME response length
  crypto: picoxcell - adjust the position of tasklet_init and fix missed tasklet_kill
  crypto: api - Fix race condition in crypto_spawn_alg
  crypto: atmel-aes - Fix counter overflow in CTR mode
  crypto: pcrypt - Do not clear MAY_SLEEP flag in original request
  crypto: ccp - set max RSA modulus size for v3 platform devices as well
  samples/bpf: Don't try to remove user's homedir on clean
  ftrace: Protect ftrace_graph_hash with ftrace_sync
  ftrace: Add comment to why rcu_dereference_sched() is open coded
  tracing: Annotate ftrace_graph_notrace_hash pointer with __rcu
  tracing: Annotate ftrace_graph_hash pointer with __rcu
  dm crypt: fix benbi IV constructor crash if used in authenticated mode
  dm space map common: fix to ensure new block isn't already in use
  dm zoned: support zone sizes smaller than 128MiB
  of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc
  PM: core: Fix handling of devices deleted during system-wide resume
  f2fs: code cleanup for f2fs_statfs_project()
  f2fs: fix miscounted block limit in f2fs_statfs_project()
  f2fs: choose hardlimit when softlimit is larger than hardlimit in f2fs_statfs_project()
  power: supply: ltc2941-battery-gauge: fix use-after-free
  scsi: qla2xxx: Fix mtcp dump collection failure
  crypto: api - Check spawn->alg under lock in crypto_drop_spawn
  hv_balloon: Balloon up according to request page number
  ubifs: don't trigger assertion on invalid no-key filename
  mmc: sdhci-of-at91: fix memleak on clk_get failure
  PCI: keystone: Fix link training retries initiation
  ubifs: Fix deadlock in concurrent bulk-read and writepage
  ubifs: Fix FS_IOC_SETFLAGS unexpectedly clearing encrypt flag
  ubifs: Reject unsupported ioctl flags explicitly
  alarmtimer: Unregister wakeup source when module get fails
  ACPI: video: Do not export a non working backlight interface on MSI MS-7721 boards
  mmc: spi: Toggle SPI polarity, do not hardcode it
  powerpc/pseries: Advance pfn if section is not present in lmb_is_removable()
  powerpc/xmon: don't access ASDR in VMs
  s390/mm: fix dynamic pagetable upgrade for hugetlbfs
  MIPS: fix indentation of the 'RELOCS' message
  KVM: arm64: Only sign-extend MMIO up to register width
  platform/x86: intel_scu_ipc: Fix interrupt support
  irqdomain: Fix a memory leak in irq_domain_push_irq()
  lib/test_kasan.c: fix memory leak in kmalloc_oob_krealloc_more()
  media: v4l2-rect.h: fix v4l2_rect_map_inside() top/left adjustments
  media/v4l2-core: set pages dirty upon releasing DMA buffers
  ALSA: dummy: Fix PCM format loop in proc output
  usb: gadget: f_ecm: Use atomic_t to track in-flight request
  usb: gadget: f_ncm: Use atomic_t to track in-flight request
  usb: gadget: legacy: set max_speed to super-speed
  brcmfmac: Fix memory leak in brcmf_usbdev_qinit
  tracing: Fix sched switch start/stop refcount racy updates
  mfd: dln2: More sanity checking for endpoints
  media: uvcvideo: Avoid cyclic entity chains due to malformed USB descriptors
  rxrpc: Fix NULL pointer deref due to call->conn being cleared on disconnect
  rxrpc: Fix insufficient receive notification generation
  tcp: clear tp->segs_{in|out} in tcp_disconnect()
  tcp: clear tp->data_segs{in|out} in tcp_disconnect()
  tcp: clear tp->delivered in tcp_disconnect()
  tcp: clear tp->total_retrans in tcp_disconnect()
  bnxt_en: Fix TC queue mapping.
  net_sched: fix an OOB access in cls_tcindex
  net: hsr: fix possible NULL deref in hsr_handle_frame()
  l2tp: Allow duplicate session creation with UDP
  gtp: use __GFP_NOWARN to avoid memalloc warning
  cls_rsvp: fix rsvp_policy
  sparc32: fix struct ipc64_perm type definition
  iwlwifi: mvm: fix NVM check for 3168 devices
  x86/cpu: Update cached HLE state on write to TSX_CTRL_CPUID_CLEAR
  media: iguanair: fix endpoint sanity check
  kernel/module: Fix memleak in module_add_modinfo_attrs()
  ANDROID: make memory initialization tests panic on failure
  ANDROID: added memory initialization tests to cuttlefish config
  UPSTREAM: lib/test_stackinit: Handle Clang auto-initialization pattern
  UPSTREAM: lib: Introduce test_stackinit module
  FROMLIST: rename missed uaccess .fixup section
  ANDROID: cuttlefish_defconfig: enable heap and stack initialization.
  ANDROID: f2fs: fix missing blk-crypto changes
  ANDROID: update x86_64_cuttlefish_defconfig
  BACKPORT: tracing: Remove unnecessary DEBUG_FS dependency
  BACKPORT: debugfs: Fix !DEBUG_FS debugfs_create_automount
  UPSTREAM: dynamic_debug: allow to work if debugfs is disabled
  UPSTREAM: lib: dynamic_debug: no need to check return value of debugfs_create functions
  ANDROID: f2fs: fix build error on PAGE_KERNEL_RO
  ANDROID: Revert "ANDROID: gki_defconfig: removed CONFIG_PM_WAKELOCKS"
  ANDROID: Set CONFIG_ANDROID_BINDERFS=y
  ANDROID: dm: prevent default-key from being enabled without needed hooks
  ANDROID: cf: disable virtio crypto
  ANDROID: Incremental fs: Fix initialization, use of bitfields
  ANDROID: cuttlefish_defconfig: enable dm-default-key
  ANDROID: dm: add dm-default-key target for metadata encryption
  ANDROID: dm: enable may_passthrough_inline_crypto on some targets
  ANDROID: dm: add support for passing through inline crypto support
  ANDROID: block: Introduce passthrough keyslot manager
  ANDROID: ext4, f2fs: enable direct I/O with inline encryption
  BACKPORT: FROMLIST: scsi: ufs: add program_key() variant op
  ANDROID: block: export symbols needed for modules to use inline crypto
  ANDROID: block: fix some inline crypto bugs
  ANDROID: fscrypt: add support for hardware-wrapped keys
  ANDROID: block: add KSM op to derive software secret from wrapped key
  ANDROID: block: provide key size as input to inline crypto APIs
  ANDROID: ufshcd-crypto: export cap find API
  ANDROID: scsi: ufs-qcom: Enable BROKEN_CRYPTO quirk flag
  ANDROID: scsi: ufs: Add quirk bit for controllers that don't play well with inline crypto
  ANDROID: cuttlefish_defconfig: Enable blk-crypto fallback
  BACKPORT: FROMLIST: Update Inline Encryption from v5 to v6 of patch series
  ANDROID: scsi: ufs: UFS init should not require inline crypto
  ANDROID: scsi: ufs: UFS crypto variant operations API
  ANDROID: cuttlefish_defconfig: enable inline encryption
  BACKPORT: FROMLIST: ext4: add inline encryption support
  BACKPORT: FROMLIST: f2fs: add inline encryption support
  BACKPORT: FROMLIST: fscrypt: add inline encryption support
  BACKPORT: FROMLIST: scsi: ufs: Add inline encryption support to UFS
  BACKPORT: FROMLIST: scsi: ufs: UFS crypto API
  BACKPORT: FROMLIST: scsi: ufs: UFS driver v2.1 spec crypto additions
  BACKPORT: FROMLIST: block: blk-crypto for Inline Encryption
  ANDROID: block: Fix bio_crypt_should_process WARN_ON
  BACKPORT: FROMLIST: block: Add encryption context to struct bio
  BACKPORT: FROMLIST: block: Keyslot Manager for Inline Encryption
  BACKPORT: atomic: Add irqsave variant of atomic_dec_and_lock()
  ANDROID: Incremental fs: Fix crash on failed lookup
  ANDROID: Incremental fs: Make files writeable
  ANDROID: Incremental fs: Remove C++-style comments
  f2fs: fix race conditions in ->d_compare() and ->d_hash()
  f2fs: fix dcache lookup of !casefolded directories
  f2fs: Add f2fs stats to sysfs
  f2fs: delete duplicate information on sysfs nodes
  f2fs: change to use rwsem for gc_mutex
  f2fs: update f2fs document regarding to fsync_mode
  f2fs: add a way to turn off ipu bio cache
  f2fs: code cleanup for f2fs_statfs_project()
  f2fs: fix miscounted block limit in f2fs_statfs_project()
  f2fs: show the CP_PAUSE reason in checkpoint traces
  f2fs: fix deadlock allocating bio_post_read_ctx from mempool
  f2fs: remove unneeded check for error allocating bio_post_read_ctx
  f2fs: convert inline_dir early before starting rename
  f2fs: fix memleak of kobject
  f2fs: fix to add swap extent correctly
  mm: export add_swap_extent()
  f2fs: run fsck when getting bad inode during GC
  f2fs: support data compression
  f2fs: free sysfs kobject
  f2fs: declare nested quota_sem and remove unnecessary sems
  mm: kvmalloc does not fallback to vmalloc for incompatible gfp flags
  f2fs: don't put new_page twice in f2fs_rename
  f2fs: set I_LINKABLE early to avoid wrong access by vfs
  f2fs: don't keep META_MAPPING pages used for moving verity file blocks
  f2fs: introduce private bioset
  f2fs: cleanup duplicate stats for atomic files
  f2fs: set GFP_NOFS when moving inline dentries
  f2fs: should avoid recursive filesystem ops
  f2fs: keep quota data on write_begin failure
  f2fs: call f2fs_balance_fs outside of locked page
  f2fs: preallocate DIO blocks when forcing buffered_io

 Conflicts:
	arch/arm64/configs/cuttlefish_defconfig
	drivers/of/Kconfig
	drivers/scsi/ufs/ufshcd.c
	fs/ext4/page-io.c
	fs/f2fs/data.c
	kernel/time/alarmtimer.c

 Fixed build error:
	fs/f2fs/super.c

Change-Id: Icab37412960fb921b699c0c896c58e3d12db741a
Signed-off-by: Srinivasarao P <[email protected]>
  • Loading branch information
Srinivasarao P committed Jul 27, 2020
2 parents 9499b3f + 4211691 commit 5f43935
Show file tree
Hide file tree
Showing 223 changed files with 12,993 additions and 1,636 deletions.
280 changes: 167 additions & 113 deletions Documentation/ABI/testing/sysfs-fs-f2fs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions Documentation/admin-guide/dynamic-debug-howto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ If you make a mistake with the syntax, the write will fail thus::
<debugfs>/dynamic_debug/control
-bash: echo: write error: Invalid argument

Note, for systems without 'debugfs' enabled, the control file can be
found in ``/proc/dynamic_debug/control``.

Viewing Dynamic Debug Behaviour
===============================

Expand Down
216 changes: 52 additions & 164 deletions Documentation/filesystems/f2fs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,17 @@ checkpoint=%s[:%u[%]] Set to "disable" to turn off checkpointing. Set to "en
hide up to all remaining free space. The actual space that
would be unusable can be viewed at /sys/fs/f2fs/<disk>/unusable
This space is reclaimed once checkpoint=enable.
compress_algorithm=%s Control compress algorithm, currently f2fs supports "lzo"
and "lz4" algorithm.
compress_log_size=%u Support configuring compress cluster size, the size will
be 4KB * (1 << %u), 16KB is minimum size, also it's
default size.
compress_extension=%s Support adding specified extension, so that f2fs can enable
compression on those corresponding files, e.g. if all files
with '.ext' has high compression rate, we can set the '.ext'
on compression extension list and enable compression on
these file by default rather than to enable it via ioctl.
For other files, we can still enable compression via ioctl.

================================================================================
DEBUGFS ENTRIES
Expand All @@ -259,170 +270,6 @@ The files in each per-device directory are shown in table below.

Files in /sys/fs/f2fs/<devname>
(see also Documentation/ABI/testing/sysfs-fs-f2fs)
..............................................................................
File Content

gc_urgent_sleep_time This parameter controls sleep time for gc_urgent.
500 ms is set by default. See above gc_urgent.

gc_min_sleep_time This tuning parameter controls the minimum sleep
time for the garbage collection thread. Time is
in milliseconds.

gc_max_sleep_time This tuning parameter controls the maximum sleep
time for the garbage collection thread. Time is
in milliseconds.

gc_no_gc_sleep_time This tuning parameter controls the default sleep
time for the garbage collection thread. Time is
in milliseconds.

gc_idle This parameter controls the selection of victim
policy for garbage collection. Setting gc_idle = 0
(default) will disable this option. Setting
gc_idle = 1 will select the Cost Benefit approach
& setting gc_idle = 2 will select the greedy approach.

gc_urgent This parameter controls triggering background GCs
urgently or not. Setting gc_urgent = 0 [default]
makes back to default behavior, while if it is set
to 1, background thread starts to do GC by given
gc_urgent_sleep_time interval.

reclaim_segments This parameter controls the number of prefree
segments to be reclaimed. If the number of prefree
segments is larger than the number of segments
in the proportion to the percentage over total
volume size, f2fs tries to conduct checkpoint to
reclaim the prefree segments to free segments.
By default, 5% over total # of segments.

main_blkaddr This value gives the first block address of
MAIN area in the partition.

max_small_discards This parameter controls the number of discard
commands that consist small blocks less than 2MB.
The candidates to be discarded are cached until
checkpoint is triggered, and issued during the
checkpoint. By default, it is disabled with 0.

discard_granularity This parameter controls the granularity of discard
command size. It will issue discard commands iif
the size is larger than given granularity. Its
unit size is 4KB, and 4 (=16KB) is set by default.
The maximum value is 128 (=512KB).

reserved_blocks This parameter indicates the number of blocks that
f2fs reserves internally for root.

batched_trim_sections This parameter controls the number of sections
to be trimmed out in batch mode when FITRIM
conducts. 32 sections is set by default.

ipu_policy This parameter controls the policy of in-place
updates in f2fs. There are five policies:
0x01: F2FS_IPU_FORCE, 0x02: F2FS_IPU_SSR,
0x04: F2FS_IPU_UTIL, 0x08: F2FS_IPU_SSR_UTIL,
0x10: F2FS_IPU_FSYNC.

min_ipu_util This parameter controls the threshold to trigger
in-place-updates. The number indicates percentage
of the filesystem utilization, and used by
F2FS_IPU_UTIL and F2FS_IPU_SSR_UTIL policies.

min_fsync_blocks This parameter controls the threshold to trigger
in-place-updates when F2FS_IPU_FSYNC mode is set.
The number indicates the number of dirty pages
when fsync needs to flush on its call path. If
the number is less than this value, it triggers
in-place-updates.

min_seq_blocks This parameter controls the threshold to serialize
write IOs issued by multiple threads in parallel.

min_hot_blocks This parameter controls the threshold to allocate
a hot data log for pending data blocks to write.

min_ssr_sections This parameter adds the threshold when deciding
SSR block allocation. If this is large, SSR mode
will be enabled early.

ram_thresh This parameter controls the memory footprint used
by free nids and cached nat entries. By default,
1 is set, which indicates 10 MB / 1 GB RAM.

ra_nid_pages When building free nids, F2FS reads NAT blocks
ahead for speed up. Default is 0.

dirty_nats_ratio Given dirty ratio of cached nat entries, F2FS
determines flushing them in background.

max_victim_search This parameter controls the number of trials to
find a victim segment when conducting SSR and
cleaning operations. The default value is 4096
which covers 8GB block address range.

migration_granularity For large-sized sections, F2FS can stop GC given
this granularity instead of reclaiming entire
section.

dir_level This parameter controls the directory level to
support large directory. If a directory has a
number of files, it can reduce the file lookup
latency by increasing this dir_level value.
Otherwise, it needs to decrease this value to
reduce the space overhead. The default value is 0.

cp_interval F2FS tries to do checkpoint periodically, 60 secs
by default.

idle_interval F2FS detects system is idle, if there's no F2FS
operations during given interval, 5 secs by
default.

discard_idle_interval F2FS detects the discard thread is idle, given
time interval. Default is 5 secs.

gc_idle_interval F2FS detects the GC thread is idle, given time
interval. Default is 5 secs.

umount_discard_timeout When unmounting the disk, F2FS waits for finishing
queued discard commands which can take huge time.
This gives time out for it, 5 secs by default.

iostat_enable This controls to enable/disable iostat in F2FS.

readdir_ra This enables/disabled readahead of inode blocks
in readdir, and default is enabled.

gc_pin_file_thresh This indicates how many GC can be failed for the
pinned file. If it exceeds this, F2FS doesn't
guarantee its pinning state. 2048 trials is set
by default.

extension_list This enables to change extension_list for hot/cold
files in runtime.

inject_rate This controls injection rate of arbitrary faults.

inject_type This controls injection type of arbitrary faults.

dirty_segments This shows # of dirty segments.

lifetime_write_kbytes This shows # of data written to the disk.

features This shows current features enabled on F2FS.

current_reserved_blocks This shows # of blocks currently reserved.

unusable If checkpoint=disable, this shows the number of
blocks that are unusable.
If checkpoint=enable it shows the number of blocks
that would be unusable if checkpoint=disable were
to be set.

encoding This shows the encoding used for casefolding.
If casefolding is not enabled, returns (none)

================================================================================
USAGE
Expand Down Expand Up @@ -780,3 +627,44 @@ zero or random data, which is useful to the below scenario where:
4. address = fibmap(fd, offset)
5. open(blkdev)
6. write(blkdev, address)

Compression implementation
--------------------------

- New term named cluster is defined as basic unit of compression, file can
be divided into multiple clusters logically. One cluster includes 4 << n
(n >= 0) logical pages, compression size is also cluster size, each of
cluster can be compressed or not.

- In cluster metadata layout, one special block address is used to indicate
cluster is compressed one or normal one, for compressed cluster, following
metadata maps cluster to [1, 4 << n - 1] physical blocks, in where f2fs
stores data including compress header and compressed data.

- In order to eliminate write amplification during overwrite, F2FS only
support compression on write-once file, data can be compressed only when
all logical blocks in file are valid and cluster compress ratio is lower
than specified threshold.

- To enable compression on regular inode, there are three ways:
* chattr +c file
* chattr +c dir; touch dir/file
* mount w/ -o compress_extension=ext; touch file.ext

Compress metadata layout:
[Dnode Structure]
+-----------------------------------------------+
| cluster 1 | cluster 2 | ......... | cluster N |
+-----------------------------------------------+
. . . .
. . . .
. Compressed Cluster . . Normal Cluster .
+----------+---------+---------+---------+ +---------+---------+---------+---------+
|compr flag| block 1 | block 2 | block 3 | | block 1 | block 2 | block 3 | block 4 |
+----------+---------+---------+---------+ +---------+---------+---------+---------+
. .
. .
. .
+-------------+-------------+----------+----------------------------+
| data length | data chksum | reserved | compressed data |
+-------------+-------------+----------+----------------------------+
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 14
SUBLEVEL = 170
SUBLEVEL = 171
EXTRAVERSION =
NAME = Petit Gorille

Expand Down Expand Up @@ -1256,7 +1256,7 @@ endif
endif

# Disable clang-specific config options when using a different compiler
clang-specific-configs := LTO_CLANG CFI_CLANG SHADOW_CALL_STACK
clang-specific-configs := LTO_CLANG CFI_CLANG SHADOW_CALL_STACK INIT_STACK_ALL

PHONY += check-clang-specific-options
check-clang-specific-options: $(KCONFIG_CONFIG) FORCE
Expand Down
1 change: 1 addition & 0 deletions arch/arc/boot/dts/axs10x_mb.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
interrupt-names = "macirq";
phy-mode = "rgmii";
snps,pbl = < 32 >;
snps,multicast-filter-bins = <256>;
clocks = <&apbclk>;
clock-names = "stmmaceth";
max-speed = <100>;
Expand Down
28 changes: 14 additions & 14 deletions arch/arm/boot/dts/sama5d3.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1185,49 +1185,49 @@
usart0_clk: usart0_clk {
#clock-cells = <0>;
reg = <12>;
atmel,clk-output-range = <0 66000000>;
atmel,clk-output-range = <0 83000000>;
};

usart1_clk: usart1_clk {
#clock-cells = <0>;
reg = <13>;
atmel,clk-output-range = <0 66000000>;
atmel,clk-output-range = <0 83000000>;
};

usart2_clk: usart2_clk {
#clock-cells = <0>;
reg = <14>;
atmel,clk-output-range = <0 66000000>;
atmel,clk-output-range = <0 83000000>;
};

usart3_clk: usart3_clk {
#clock-cells = <0>;
reg = <15>;
atmel,clk-output-range = <0 66000000>;
atmel,clk-output-range = <0 83000000>;
};

uart0_clk: uart0_clk {
#clock-cells = <0>;
reg = <16>;
atmel,clk-output-range = <0 66000000>;
atmel,clk-output-range = <0 83000000>;
};

twi0_clk: twi0_clk {
reg = <18>;
#clock-cells = <0>;
atmel,clk-output-range = <0 16625000>;
atmel,clk-output-range = <0 41500000>;
};

twi1_clk: twi1_clk {
#clock-cells = <0>;
reg = <19>;
atmel,clk-output-range = <0 16625000>;
atmel,clk-output-range = <0 41500000>;
};

twi2_clk: twi2_clk {
#clock-cells = <0>;
reg = <20>;
atmel,clk-output-range = <0 16625000>;
atmel,clk-output-range = <0 41500000>;
};

mci0_clk: mci0_clk {
Expand All @@ -1243,19 +1243,19 @@
spi0_clk: spi0_clk {
#clock-cells = <0>;
reg = <24>;
atmel,clk-output-range = <0 133000000>;
atmel,clk-output-range = <0 166000000>;
};

spi1_clk: spi1_clk {
#clock-cells = <0>;
reg = <25>;
atmel,clk-output-range = <0 133000000>;
atmel,clk-output-range = <0 166000000>;
};

tcb0_clk: tcb0_clk {
#clock-cells = <0>;
reg = <26>;
atmel,clk-output-range = <0 133000000>;
atmel,clk-output-range = <0 166000000>;
};

pwm_clk: pwm_clk {
Expand All @@ -1266,7 +1266,7 @@
adc_clk: adc_clk {
#clock-cells = <0>;
reg = <29>;
atmel,clk-output-range = <0 66000000>;
atmel,clk-output-range = <0 83000000>;
};

dma0_clk: dma0_clk {
Expand Down Expand Up @@ -1297,13 +1297,13 @@
ssc0_clk: ssc0_clk {
#clock-cells = <0>;
reg = <38>;
atmel,clk-output-range = <0 66000000>;
atmel,clk-output-range = <0 83000000>;
};

ssc1_clk: ssc1_clk {
#clock-cells = <0>;
reg = <39>;
atmel,clk-output-range = <0 66000000>;
atmel,clk-output-range = <0 83000000>;
};

sha_clk: sha_clk {
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/sama5d3_can.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
can0_clk: can0_clk {
#clock-cells = <0>;
reg = <40>;
atmel,clk-output-range = <0 66000000>;
atmel,clk-output-range = <0 83000000>;
};

can1_clk: can1_clk {
#clock-cells = <0>;
reg = <41>;
atmel,clk-output-range = <0 66000000>;
atmel,clk-output-range = <0 83000000>;
};
};
};
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/sama5d3_tcb1.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
tcb1_clk: tcb1_clk {
#clock-cells = <0>;
reg = <27>;
atmel,clk-output-range = <0 166000000>;
};
};
};
Expand Down
Loading

0 comments on commit 5f43935

Please sign in to comment.