Commit graph

15 commits

Author SHA1 Message Date
Shiyong Li
9e75018bbf fs/exfat: do error check for d_splice_alias return
This patch adds error check in case a defect exFAT SD cards is inserted.

Change-Id: I37f6b8716abd556908aad72b18fcc7ac5719766e
Signed-off-by: Min Shi <e13386@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102184
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2017-12-12 12:35:30 -06:00
Shiyong Li
f961c72ccb fs/exfat: fix every bio only has one block
This patch fix the bug that exfat fs cannot write
continuous blocks in one bio.
This will cause every request submit in block layer
only contains one block, cause write speed slower.

Change-Id: Ia548a7d8051defc1498d2d11d39e069bf683fdff
Signed-off-by: haojl2 <haojl2@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102183
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2017-12-12 12:35:22 -06:00
Shiyong Li
5b326dd273 fs/exfat: send uevnet from workqueue
We can not send uevent directly because it might be called
from atomic context.

Change-Id: I384a7f197b22b1fcb8d068c98908e4fa5a1d3b82
Signed-off-by: Lianwei Wang <a22439@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102182
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2017-12-12 12:35:16 -06:00
Shiyong Li
5b7325a279 fs/exfat: support readonly uevent
Change-Id: Iba732aa27cce07133bdbc085bee10182f5796298
Signed-off-by: Lianwei Wang <a22439@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102181
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2017-12-12 12:35:08 -06:00
Shiyong Li
251b18ea98 fs/exfat: use correct length for utf conversion
when call utf16s_to_utf8s, last parmater 'maxout' will be reduced
with the returned value of utf32_to_utf8, the value reflects the
size of one utf character, it could be 1~max charset size(3), so
maxout should use MAX_NAME_LENGTH * MAX_CHARSET_SIZE
when call utf8s_to_utf16s, the inlen will be reduced with the
the returned value of utf8_to_utf32, so it should use
MAX_NAME_LENGTH * MAX_CHARSET_SIZE or the lenghth of p_cstring whose
max value is MAX_NAME_LENGTH * MAX_CHARSET_SIZE.

Change-Id: Icbea02ece4b1a5b015037a6a54178ee8e08d4325
Signed-off-by: Shengzhe Zhao <a18689@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102180
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2017-12-12 12:35:02 -06:00
Shiyong Li
a77212a42c fs/exfat: avoid setting 0 over buffer uniname
utf8s_to_utf16s could return -EINVAL(-22), then uniname[i] =
uniname[-22] = '\0' will corrupt other local variable.
uniname is a local variable having different address everytime
when call nls_cstring_to_uniname. so uniname[-22] could corrupt
some different addresses.
and also when filename reaches at maximum length, need to leave
last one space in buffer for '\0'

Change-Id: I44bbdd3249150ad5617c7cd13207cfa37b102a77
Signed-off-by: Shengzhe Zhao <a18689@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102179
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2017-12-12 12:34:55 -06:00
Shiyong Li
27dcc525e6 fs/exfat: unlock pages under readonly status
The ->writepage should unlock its page before returning the results.
Otherwise, evict_inode can be hanged while truncating pages.

- Backtrace -

(__schedule+0x3dc/0x908) from [<c0b67854>] (io_schedule+0x6c/0x94)
(io_schedule+0x6c/0x94) from [<c01ce2dc>] (sleep_on_page+0x8/0x10)
(sleep_on_page+0x8/0x10) from [<c0b64e70>] (__wait_on_bit_lock+0x6c/0xb8)
(__wait_on_bit_lock+0x6c/0xb8) from [<c01ce418>] (__lock_page+0x90/0x98)
(__lock_page+0x90/0x98) from [<c01dcae8>] (truncate_inode_pages_range+0x360/0x37c)
(truncate_inode_pages_range+0x360/0x37c) from [<c01dcb1c>] (truncate_inode_pages+0x18/0x20)
(truncate_inode_pages+0x18/0x20) from [<c0304618>] (exfat_evict_inode+0x18/0xb0)
(exfat_evict_inode+0x18/0xb0) from [<c0228590>] (evict+0x94/0x178)
(evict+0x94/0x178) from [<c02286a4>] (dispose_list+0x30/0x40)
(dispose_list+0x30/0x40) from [<c022924c>] (evict_inodes+0xc8/0xd0)
(evict_inodes+0xc8/0xd0) from [<c0212964>] (generic_shutdown_super+0x44/0xc4)
(generic_shutdown_super+0x44/0xc4) from [<c0212bd4>] (kill_block_super+0x18/0x68)
(kill_block_super+0x18/0x68) from [<c0212f3c>] (deactivate_locked_super+0x48/0x64)
(deactivate_locked_super+0x48/0x64) from [<c022d660>] (SyS_umount+0x90/0x390)

Change-Id: I0a9caebeceda503c72e365957b1bf97d74f3de89
Signed-off-by: Jaegeuk Kim <jaegeuk@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102178
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2017-12-12 12:34:49 -06:00
Shiyong Li
1e1a1d11ca fs/exfat: link superblock for all the buffer head
Otherwise, we can get kernel panic when handling fs_error().

Change-Id: I288ece9bdc0182b0d4cf23f1bba920d341a8f540
Signed-off-by: Jaegeuk Kim <jaegeuk@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102177
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2017-12-12 12:34:43 -06:00
Shiyong Li
982b6998ab fs/exfat: implement errors=remount-ro
This patch implements errors=remount-ro for exfat.

Port of cf4fa60 and 58ec900 on 8996 with minor change for
updated submit_io() interface in kernel 4.9.

Change-Id: Iee791a99216ecf9f710adffa681706e761f97d8f
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102176
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2017-12-12 12:34:37 -06:00
Shiyong Li
89b6111d7d fs/exfat: build exfat lib as DLKM
Build exfat lib as exfat.ko.

Change-Id: I653e944607f0d05e6f5ff8af4743291567d824c3
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102175
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2017-12-12 12:34:31 -06:00
Shiyong Li
f61055be5c fs/exfat: import original library v1.2.9
original repo: https://github.com/dorimanx/exfat-nofuse

latest commit:
commit de4c760
Author: Yuri.Sh <dorimanx@users.noreply.github.com>
Date:   Tue Jun 20 00:56:18 2017 +0300

    Merge pull request #116 from ian-abbott/no-krel

    Makefile: remove KREL

Change-Id: I918688177815d21a3227e740ef36680f0913d4f9
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102174
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2017-12-12 12:34:21 -06:00
Kenny Kessler
6f78313042 motorola: dlkm: Add Cypress Capsense
Add the Cypress Capsense DLKM.

Change-Id: Ia38e38d0042431be56ed20ec800b9b70bca032c9
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1099054
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2017-12-05 11:26:16 -06:00
Kenny Kessler
e07767d9f5 motorola: dlkm: Add Sensors Class
Pull the Sensors Class commits into the DLKM
directory structure.

This version is pulled from the bo-8998 branch
following the commits in (CR) and
(CR).

Orignal initial commit from QCOM is as follows

"sensors: add the sensors class support"

"Add a new sensors sysfs class and put all the sensors device driver"
"information in this class folder."

"Change-Id: I7c35ec4642e4dbd264945ad3839914935b301af0"
"Signed-off-by: Jie Cheng <rockiec@codeaurora.org>"

Change-Id: If9b0bd9f1ed1569a7f069781ddbe0bf02439e947
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1099024
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2017-12-05 11:26:12 -06:00
Kenny Kessler
b0416cac67 motorola: dlkm: Initial AndroidKernelModule.mk
Add the Android Kernel Module Makefile that all motorola
dlkm will reference.

Change-Id: I2676c8ecf94099b8de8f33a708946bfd4356dd0e
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1099028
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2017-12-05 11:26:05 -06:00
Andrew Wheeler
f45b0686b1 Initial commit (empty) 2017-11-28 15:33:18 -06:00