Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 566743e4 authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag '5.19.1' of https://github.com/namjaejeon/linux-exfat-oot into android13-5.4-lahaina

exfat: release 5.19.1 version
Major changes are:
 - fix referencing wrong parent directory information during rename.
 - introduce a sys_tz mount option to use system timezone.
 - improve performance while zeroing a cluster with dirsync mount option.
 - fix slab-out-bounds in exat_clear_bitmap() reported from syzbot.
 - Add keep_last_dots mount option to allow access to paths with trailing dots.
 - Avoid repetitive volume dirty bit set/clear to improve storage life time.
 - Fix ->i_blocks truncation issue that still exists elsewhere.
 - 4 cleanups & typos fixes.
 - Move super block magic number to magic.h
 - Fix missing REQ_SYNC in exfat_update_bhs().
 - Fix ->i_blocks truncation issue caused by wrong 32bit mask.

 Conflicts:
	fs/exfat/Kconfig
	fs/exfat/Makefile
	fs/exfat/balloc.c
	fs/exfat/cache.c
	fs/exfat/dir.c
	fs/exfat/exfat_fs.h
	fs/exfat/exfat_raw.h
	fs/exfat/fatent.c
	fs/exfat/file.c
	fs/exfat/inode.c
	fs/exfat/misc.c
	fs/exfat/namei.c
	fs/exfat/nls.c
	fs/exfat/super.c

Change-Id: I5fd39768b9fb0419602fc77153de39291e6a1f1d
parents 1abb0c92 89b59ca3
Loading
Loading
Loading
Loading
+65 −0
Original line number Diff line number Diff line
#!/usr/bin/perl

#
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright (C) 2019 Samsung Electronics Co., Ltd.
#

use strict;

sub tweak_sysctl()
{
	`sudo sysctl kernel.hardlockup_panic=0`;
	`sudo sysctl kernel.hung_task_panic=0`;
	`sudo sysctl kernel.panic=128`;
	`sudo sysctl kernel.panic_on_io_nmi=0`;
	`sudo sysctl kernel.panic_on_oops=0`;
	`sudo sysctl kernel.panic_on_rcu_stall=0`;
	`sudo sysctl kernel.panic_on_unrecovered_nmi=0`;
	`sudo sysctl kernel.panic_on_warn=0`;
	`sudo sysctl kernel.softlockup_panic=0`;
	`sudo sysctl kernel.unknown_nmi_panic=0`;
}

sub execute($$)
{
	my $cmd = shift;
	my $timeout = shift;
	my $output = "Timeout";
	my $status = 1;

	$timeout = 8 * 60 if (!defined $timeout);

	tweak_sysctl();

	eval {
		local $SIG{ALRM} = sub {
			print "TIMEOUT:\n";
			system("top -n 1"), print "top\n";
			system("free"), print "free\n";
			system("dmesg"), print "dmesg\n";
			die "Timeout\n";
		};

		print "Executing $cmd with timeout $timeout\n";

		alarm $timeout;
		$output = `$cmd`;
		$status = $?;
		alarm 0;
		print $output."\n";
		print "Finished: status $status\n";
	};

	if ($@) {
		die unless $@ eq "Timeout\n";
	}
}

if (! defined $ARGV[0]) {
	print "Usage:\n\t./.travis_cmd_wrapper.pl command [timeout seconds]\n";
	exit 1;
}

execute($ARGV[0], $ARGV[1]);
+37 −0
Original line number Diff line number Diff line
#!/bin/sh

#
# A simple script we are using to get the latest mainline kernel
# tar ball
#

wget https://www.kernel.org/releases.json
if [ $? -ne 0 ]; then
	echo "Could not download kernel.org/releases.json"
	exit 1
fi

VER=$(cat releases.json | python2.7 -c "import sys, json; print json.load(sys.stdin)['latest_stable']['version']")
if [ $? -ne 0 ]; then
	echo "Could not parse release.json"
	exit 1
fi

if [ "z$VER" = "z" ]; then
	echo "Could not determine latest release version"
	exit 1
fi

wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-"$VER".tar.gz
if [ $? -ne 0 ]; then
	echo "Could not download $VER kernel version"
	exit 1
fi

tar xf linux-"$VER".tar.gz
if [ $? -ne 0 ]; then
	echo "Could not untar kernel tar ball"
	exit 1
fi

mv linux-"$VER" linux
+3 −4
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@ config EXFAT_DEFAULT_IOCHARSET
	depends on EXFAT_FS
	help
	  Set this to the default input/output character set to use for
	  converting between the encoding that is used for user visible
	  filenames and the UTF-16 character encoding that the exFAT
	  filesystem uses.  This can be overridden with the "iocharset" mount
	  option for the exFAT filesystems.
	  converting between the encoding is used for user visible filename and
	  UTF-16 character that exfat filesystem use, and can be overridden with
	  the "iocharset" mount option for exFAT filesystems.
+32 −0
Original line number Diff line number Diff line
@@ -2,7 +2,39 @@
#
# Makefile for the linux exFAT filesystem support.
#
ifneq ($(KERNELRELEASE),)
obj-$(CONFIG_EXFAT_FS) += exfat.o

exfat-y	:= inode.o namei.o dir.o super.o fatent.o cache.o nls.o misc.o \
	   file.o balloc.o
else
# Called from external kernel module build

KERNELRELEASE	?= $(shell uname -r)
KDIR	?= /lib/modules/${KERNELRELEASE}/build
MDIR	?= /lib/modules/${KERNELRELEASE}
PWD	:= $(shell pwd)

export CONFIG_EXFAT_FS := m

all:
	$(MAKE) -C $(KDIR) M=$(PWD) modules

clean:
	$(MAKE) -C $(KDIR) M=$(PWD) clean

help:
	$(MAKE) -C $(KDIR) M=$(PWD) help

install: exfat.ko
	rm -f ${MDIR}/kernel/fs/exfat/exfat.ko
	install -m644 -b -D exfat.ko ${MDIR}/kernel/fs/exfat/exfat.ko
	depmod -aq

uninstall:
	rm -rf ${MDIR}/kernel/fs/exfat
	depmod -aq

endif

.PHONY : all clean install uninstall

fs/exfat/README.md

0 → 100644
+53 −0
Original line number Diff line number Diff line
## exFAT filesystem 
This is the exfat filesystem for support from the linux 4.1 kernel
to the latest kernel. 

## Installing as a stand-alone module

Install prerequisite package for Fedora, RHEL:
```
	yum install kernel-devel-$(uname -r)
```

Build step:
```
	make
	sudo make install
```

To load the driver manually, run this as root:
```
	modprobe exfat
```


## Installing as a part of the kernel

1. Let's take [linux] as the path to your kernel source dir.
```
	cd [linux]
	cp -ar exfat [linux]/fs/
```

2. edit [linux]/fs/Kconfig
```
	source "fs/fat/Kconfig"
	+source "fs/exfat/Kconfig"
	source "fs/ntfs/Kconfig"
```

3. edit [linux]/fs/Makefile
```
	obj-$(CONFIG_FAT_FS)          += fat/
	+obj-$(CONFIG_EXFAT_FS)       += exfat/
	obj-$(CONFIG_BFS_FS)          += bfs/
```
4. make menuconfig and set exfat
```
	File systems  --->
		DOS/FAT/NT Filesystems  --->
			<M> exFAT filesystem support
			(utf8) Default iocharset for exFAT
```

build your kernel
Loading