RE: [PATCH 30/32] Documentation: net: dsa: update configuration.rst reference

2021-04-01 Thread Namjae Jeon
> Em Thu, 1 Apr 2021 14:41:15 +0200 > Andrew Lunn escreveu: > > > On Thu, Apr 01, 2021 at 02:17:50PM +0200, Mauro Carvalho Chehab wrote: > > > The file name: Documentation/configuration.txt should be, instead: > > > Documentation/networking/dsa/configuration.rst. > > > > > > Update its

Re: [Linux-cifsd-devel] [PATCH] cifsd: use kfree to free memory allocated by kzalloc

2021-04-01 Thread Namjae Jeon
2021-04-01 22:14 GMT+09:00, Ralph Boehme : > Am 4/1/21 um 2:59 PM schrieb Namjae Jeon: >> 2021-04-01 21:50 GMT+09:00, Ralph Boehme : >>> fwiw, while at it what about renaming everything that still references >>> "cifs" to "smb" ? This is not the 90'

Re: [Linux-cifsd-devel] [PATCH] cifsd: use kfree to free memory allocated by kzalloc

2021-04-01 Thread Namjae Jeon
2021-04-01 20:50 GMT+09:00, Dan Carpenter : > On Thu, Apr 01, 2021 at 04:39:33PM +0500, Muhammad Usama Anjum wrote: >> kfree should be used to free memory allocated by kzalloc to avoid >> any overhead and for maintaining consistency. >> >> Fixes: 5dfeb6d945 ("cifsd: use kmalloc() for small

Re: [Linux-cifsd-devel] [PATCH] cifsd: use kfree to free memory allocated by kzalloc

2021-04-01 Thread Namjae Jeon
2021-04-01 21:50 GMT+09:00, Ralph Boehme : > Am 4/1/21 um 2:43 PM schrieb Namjae Jeon: >> 2021-04-01 20:50 GMT+09:00, Dan Carpenter : >>> On Thu, Apr 01, 2021 at 04:39:33PM +0500, Muhammad Usama Anjum wrote: >>>> kfree should be used to free memory allocated by kzal

RE: [PATCH] cifsd: use kfree to free memory allocated by kmalloc or kzalloc

2021-04-01 Thread Namjae Jeon
> > kfree should be used to free memory allocated by kmalloc or kzalloc to avoid > any overhead and for > maintaining consistency. > > Fixes: 5dfeb6d945 ("cifsd: use kmalloc() for small allocations") > Signed-off-by: Muhammad Usama Anjum Looks good. I will apply. Thanks for your patch!

RE: [PATCH] cifsd: fix memory leak when loop ends

2021-04-01 Thread Namjae Jeon
> > Memory is being allocated and if veto_list is zero, the loop breaks without > cleaning up the allocated > memory. In this patch, the length check has been moved before allocation. If > loop breaks, the memory > isn't allocated in the first place. Thus the memory is being protected from >

Re: [Linux-cifsd-devel] [PATCH][next] cifsd: remove redundant assignment to variable err

2021-03-26 Thread Namjae Jeon
2021-03-26 2:35 GMT+09:00, Colin King : > From: Colin Ian King > > The variable err is being initialized with a value that is never read > and it is being updated later with a new value. The initialization is > redundant and can be removed. > > Addresses-Coverity: ("Unused value") >

RE: [PATCH v3] exfat: speed up iterate/lookup by fixing start point of traversing cluster chain

2021-03-23 Thread Namjae Jeon
> > When directory iterate and lookup is called, there's a buggy rewinding > > of start point for traversing cluster chain to the parent directory > > entry's first cluster. This caused repeated cluster chain traversing > > from the first entry of the parent directory that would show worse > >

RE: [PATCH 1/5] cifsd: add server handler and tranport layers

2021-03-22 Thread Namjae Jeon
> On Tue, Mar 23, 2021 at 12:01:22PM +0900, Namjae Jeon wrote: > > > On Mon, Mar 22, 2021 at 02:13:40PM +0900, Namjae Jeon wrote: > > > > +#define RESPONSE_BUF(w)((void *)(w)->response_buf) > > > > +#define REQUEST_BUF(w) ((void *)(w)-

RE: [PATCH 1/5] cifsd: add server handler and tranport layers

2021-03-22 Thread Namjae Jeon
> On Mon, Mar 22, 2021 at 02:13:40PM +0900, Namjae Jeon wrote: > > +#define RESPONSE_BUF(w)((void *)(w)->response_buf) > > +#define REQUEST_BUF(w) ((void *)(w)->request_buf) > > Why do you do this obfuscation? I don't remember exactly, but

RE: [PATCH 3/5] cifsd: add file operations

2021-03-22 Thread Namjae Jeon
> > > -Original Message- > > From: Namjae Jeon > > Sent: Sunday, March 21, 2021 10:14 PM > > To: linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; linux- > > c...@vger.kernel.org > > Cc: linux-cifsd-de...@lists.sourceforge.net; smfre...@

RE: [PATCH 3/5] cifsd: add file operations

2021-03-22 Thread Namjae Jeon
> On Mon, Mar 22, 2021 at 02:13:42PM +0900, Namjae Jeon wrote: > > This adds file operations and buffer pool for cifsd. > > Some random notes: > > > +static void rollback_path_modification(char *filename) { > > + if (filename) { > > + f

RE: [PATCH 2/5] cifsd: add server-side procedures for SMB3

2021-03-22 Thread Namjae Jeon
> On Mon, Mar 22, 2021 at 09:47:13AM +0300, Dan Carpenter wrote: > > On Mon, Mar 22, 2021 at 02:13:41PM +0900, Namjae Jeon wrote: > > > +static unsigned char > > > +asn1_octet_decode(struct asn1_ctx *ctx, unsigned char *ch) { > > > + if (ctx->pointer &g

RE: [PATCH 2/5] cifsd: add server-side procedures for SMB3

2021-03-22 Thread Namjae Jeon
> On Mon, Mar 22, 2021 at 02:13:41PM +0900, Namjae Jeon wrote: > > +static unsigned char > > +asn1_octet_decode(struct asn1_ctx *ctx, unsigned char *ch) { > > + if (ctx->pointer >= ctx->end) { > > + ctx->error = ASN1_ERR_DEC_EMPTY; > >

[PATCH 5/5] MAINTAINERS: add cifsd kernel server

2021-03-21 Thread Namjae Jeon
Add myself, Steve French, Sergey Senozhatsky and Hyunchul Lee as cifsd maintainer. Signed-off-by: Namjae Jeon Signed-off-by: Sergey Senozhatsky Signed-off-by: Hyunchul Lee Acked-by: Ronnie Sahlberg Signed-off-by: Steve French --- MAINTAINERS | 12 +++- 1 file changed, 11 insertions

[PATCH 3/5] cifsd: add file operations

2021-03-21 Thread Namjae Jeon
This adds file operations and buffer pool for cifsd. Signed-off-by: Namjae Jeon Signed-off-by: Sergey Senozhatsky Signed-off-by: Hyunchul Lee Acked-by: Ronnie Sahlberg Signed-off-by: Steve French --- fs/cifsd/buffer_pool.c | 292 ++ fs/cifsd/buffer_pool.h | 28 + fs/cifsd/vfs.c

[PATCH 4/5] cifsd: add Kconfig and Makefile

2021-03-21 Thread Namjae Jeon
This adds the Kconfig and Makefile for cifsd. Signed-off-by: Namjae Jeon Signed-off-by: Sergey Senozhatsky Signed-off-by: Hyunchul Lee Acked-by: Ronnie Sahlberg Signed-off-by: Steve French --- fs/Kconfig| 1 + fs/Makefile | 1 + fs/cifsd/Kconfig | 64

[PATCH 0/5] cifsd: introduce new SMB3 kernel server

2021-03-21 Thread Namjae Jeon
d in any toctree (Stephen Rothwell) - fix WARNING: Title overline too short (Stephen Rothwell) - fix incorrect function comments Namjae Jeon (5): cifsd: add server handler and tranport layers cifsd: add server-side procedures for SMB3 cifsd: add file operations cifsd: add Kc

RE: [PATCH] exfat: improve write performance when dirsync enabled

2021-03-19 Thread Namjae Jeon
> > Degradation of write speed caused by frequent disk access for cluster > > bitmap update on every cluster allocation could be improved by > > selective syncing bitmap buffer. Change to flush bitmap buffer only > > for the directory related operations. > > > > Signed-off-by: Hyeongseok Kim > >

RE: linux-next: Tree for Mar 18 (cifsd: Kconfig)

2021-03-18 Thread Namjae Jeon
> On 3/18/21 3:08 AM, Stephen Rothwell wrote: > > Hi all, > > > > News: there will be no linux-next release on Friday this week. > > > > Warning: Some of the branches in linux-next are still based on > > v5.12-rc1, so please be careful if you are trying to bisect a bug. > > > > News: if your -next

Re: [PATCH][next] cifsd: Fix a handful of spelling mistakes

2021-03-17 Thread Namjae Jeon
2021-03-17 18:36 GMT+09:00, Colin King : > From: Colin Ian King > > There are several spelling mistakes in various ksmbd_err and > ksmbd_debug messages. Fix these. > > Signed-off-by: Colin Ian King Applied. Thanks for your patch!

RE: linux-next: build failure after merge of the cifsd tree

2021-03-17 Thread Namjae Jeon
Hi Stephen, > Hi all, > > After merging the cifsd tree, today's linux-next build (powerpc > allyesconfig) failed like this: > > ld: fs/cifsd/misc.o:(.opd+0xc0): multiple definition of `extract_sharename'; > fs/cifs/unc.o:(.opd+0x18): > first defined here > ld: fs/cifsd/misc.o: in function

RE: linux-next: build warning after merge of the cifsd tree

2021-03-17 Thread Namjae Jeon
Hi Stephen, > Hi all, > > After merging the cifsd tree, today's linux-next build (htmldocs) produced > this warning: > > Documentation/filesystems/cifs/cifsd.rst:3: WARNING: Title overline too short. > > = > CIFSD - SMB3 Kernel Server > = >

RE: [PATCH v4 0/2] Add FITRIM ioctl support for exFAT filesystem

2021-03-03 Thread Namjae Jeon
> This is for adding FITRIM ioctl functionality to exFAT filesystem. > Firstly, because the fstrim is long operation, introduce bitmap_lock to > narrow the lock range to > prevent read operation stall. > After that, add generic ioctl function and FITRIM handler. > > Changelog > = >

RE: [PATCH v2] exfat: fix erroneous discard when clear cluster bit

2021-03-03 Thread Namjae Jeon
> If mounted with discard option, exFAT issues discard command when clear > cluster bit to remove file. > But the input parameter of cluster-to-sector calculation is abnormally added > by reserved cluster size > which is 2, leading to discard unrelated sectors included in target+2 cluster. >

[GIT PULL] exfat update for 5.12-rc1

2021-02-21 Thread Namjae Jeon
. Hyeongseok Kim (1): exfat: improve performance of exfat_free_cluster when using dirsync mount option Namjae Jeon (1): exfat: fix shift-out-of-bounds in exfat_fill_super() fs/exfat/balloc.c| 4 ++-- fs/exfat/exfat_fs.h | 2 +- fs/exfat/exfat_raw.h | 4 fs/exfat

Re: [PATCH v2 1/2] exfat: add initial ioctl function

2021-02-16 Thread Namjae Jeon
2021-02-17 9:33 GMT+09:00, Hyeongseok Kim : > On 2/17/21 9:17 AM, Chaitanya Kulkarni wrote: >> On 2/16/21 16:13, Hyeongseok Kim wrote: >>> Sorry, I don't understand exactly. >>> You're saying that these 2 patch should be merged to a single patch? >>> Would it be better? >> I think so unless there

RE: [ANNOUNCE] exfatprogs-1.1.0 version released

2021-02-09 Thread Namjae Jeon
> On Wed, Feb 10, 2021 at 12:50 AM Namjae Jeon wrote: > > > > Hi folk, > > > > We have released exfatprogs 1.1.0 version. In this release, exfatlabel > > has been added to print or re-write volume label and volume serial value. > > Also, A new dump.exfat ut

[ANNOUNCE] exfatprogs-1.1.0 version released

2021-02-09 Thread Namjae Jeon
Hi folk, We have released exfatprogs 1.1.0 version. In this release, exfatlabel has been added to print or re-write volume label and volume serial value. Also, A new dump.exfat util has been added to display statistics from a given device(Requested by Mike Fleetwood(GParted Developer)). Any

RE: UBSAN: shift-out-of-bounds in exfat_fill_super

2021-01-26 Thread Namjae Jeon
> On 1/25/21 10:39 AM, Matthew Wilcox wrote: > > On Mon, Jan 25, 2021 at 09:33:14AM -0800, syzbot wrote: > >> UBSAN: shift-out-of-bounds in fs/exfat/super.c:471:28 shift exponent > >> 4294967294 is too large for 32-bit type 'int' > > > > This is an integer underflow: > > > >

RE: UBSAN: shift-out-of-bounds in exfat_fill_super

2021-01-26 Thread Namjae Jeon
> > On Mon, Jan 25, 2021 at 09:33:14AM -0800, syzbot wrote: > > > UBSAN: shift-out-of-bounds in fs/exfat/super.c:471:28 shift exponent > > > 4294967294 is too large for 32-bit type 'int' > > > > This is an integer underflow: > > > > sbi->dentries_per_clu = 1 << > >

RE: UBSAN: shift-out-of-bounds in exfat_fill_super

2021-01-26 Thread Namjae Jeon
> On Mon, Jan 25, 2021 at 09:33:14AM -0800, syzbot wrote: > > UBSAN: shift-out-of-bounds in fs/exfat/super.c:471:28 shift exponent > > 4294967294 is too large for 32-bit type 'int' > > This is an integer underflow: > > sbi->dentries_per_clu = 1 << >

RE: [PATCH] exfat: improve performance of exfat_free_cluster when using dirsync mount option

2021-01-07 Thread Namjae Jeon
> > There are stressful update of cluster allocation bitmap when using > > dirsync mount option which is doing sync buffer on every cluster bit > > clearing. > > This could result in performance degradation when deleting big size file. > > Fix to update only when the bitmap buffer index is

[GIT PULL] exfat update for 5.11-rc1

2020-12-21 Thread Namjae Jeon
Hi Linus, This is exfat update pull request for v5.11-rc1. I add description of this pull request on below. Please pull exfat with following ones. Thanks! The following changes since commit 2c85ebc57b3e1817b6ce1a6b703928e113a90442: Linux 5.10 (2020-12-13 14:41:30 -0800) are available in the

RE: [PATCH v2] exfat: Avoid allocating upcase table using kcalloc()

2020-12-06 Thread Namjae Jeon
> The table for Unicode upcase conversion requires an order-5 allocation, which > may fail on a highly- > fragmented system: > > pool-udisksd: page allocation failure: order:5, > mode:0x40dc0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), > nodemask=(null),cpuset=/,mems_allowed=0 > CPU: 4 PID: 3756880

[GIT PULL] exfat update for 5.10-rc1

2020-10-22 Thread Namjae Jeon
) Description for this pull request: - Replace memcpy with structure assignment. - Remove unneeded codes and use helper function i_blocksize(). - Fix typos found by codespell. Namjae Jeon (1

RE: [PATCH v3 2/2] exfat: aggregate dir-entry updates into __exfat_write_inode().

2020-10-16 Thread Namjae Jeon
> *inode) static int exfat_map_cluster(struct inode *inode, unsigned int > clu_offset, > unsigned int *clu, int create) > { > - int ret, modified = false; > + int ret; > unsigned int last_clu; > struct exfat_chain new_clu; > struct super_block *sb =

[GIT PULL] exfat fixes for 5.9-rc9

2020-10-07 Thread Namjae Jeon
) Description for this pull request: - Fix use of uninitialized spinlock on error path. - Fix missing err assignment in exfat_build_inode(). Namjae Jeon (1): exfat: fix use

RE: [PATCH v3 1/2] exfat: add exfat_update_inode()

2020-10-06 Thread Namjae Jeon
> @@ -1352,19 +1340,13 @@ static int exfat_rename(struct inode *old_dir, struct > dentry *old_dentry, > new_dir->i_ctime = new_dir->i_mtime = new_dir->i_atime = > EXFAT_I(new_dir)->i_crtime = current_time(new_dir); > exfat_truncate_atime(_dir->i_atime); > - if

RE: [PATCH 2/3] exfat: remove useless check in exfat_move_file()

2020-09-28 Thread Namjae Jeon
> > >> --- a/fs/exfat/namei.c > > >> +++ b/fs/exfat/namei.c > > >> @@ -1095,11 +1095,6 @@ static int exfat_move_file(struct inode > > >> *inode, struct exfat_chain *p_olddir, > > >> if (!epmov) > > >> return -EIO; > > >> > > >> -/* check if the source and target

RE: [PATCH v2] exfat: remove 'rwoffset' in exfat_inode_info

2020-09-25 Thread Namjae Jeon
> > Remove 'rwoffset' in exfat_inode_info and replace it with the > > parameter of exfat_readdir(). > > Since rwoffset is referenced only by exfat_readdir(), it is not > > necessary a exfat_inode_info's member. > > Also, change cpos to point to the next of entry-set, and return the > > index of

Re: [PATCH 3/3] exfat: replace memcpy with structure assignment

2020-09-20 Thread Namjae Jeon
2020-09-15 19:23 GMT-07:00, Sungjong Seo : >> Use structure assignment instead of memcpy. >> >> Signed-off-by: Tetsuhiro Kohada > > Acked-by: Sungjong Seo Applied. Thanks for your patch!

Re: [PATCH 1/3] exfat: remove useless directory scan in exfat_add_entry()

2020-09-20 Thread Namjae Jeon
2020-09-15 19:22 GMT-07:00, Sungjong Seo : >> There is nothing in directory just created, so there is no need to scan. >> >> Signed-off-by: Tetsuhiro Kohada > > Acked-by: Sungjong Seo Applied. Thanks for your patch!

RE: [PATCH] exfat: eliminate dead code in exfat_find()

2020-09-03 Thread Namjae Jeon
> > The exfat_find_dir_entry() called by exfat_find() doesn't return -EEXIST. > > Therefore, the root-dir information setting is never executed. > > > > Signed-off-by: Tetsuhiro Kohada > > Acked-by: Sungjong Seo Applied. Thanks for your work!

RE: [PATCH v4 1/5] exfat: integrates dir-entry getting and validation

2020-08-26 Thread Namjae Jeon
> + i = ES_INDEX_NAME; > + while ((ep = exfat_get_validated_dentry(es, i++, TYPE_NAME))) { Please find the way to access name entries like ep_file, ep_stream without calling exfat_get_validated_dentry(). > exfat_extract_uni_name(ep, uniname); > uniname +=

RE: [PATCH] exfat: fix pointer error checking

2020-08-26 Thread Namjae Jeon
> Fix missing result check of exfat_build_inode(). > And use PTR_ERR_OR_ZERO instead of PTR_ERR. > > Signed-off-by: Tetsuhiro Kohada Pushed it to exfat #dev. Thanks for your patch!

RE: [PATCH v3] exfat: integrates dir-entry getting and validation

2020-08-26 Thread Namjae Jeon
> Thank you for quick reply! > > On 2020/08/26 13:19, Namjae Jeon wrote: > >> On 2020/08/26 10:03, Namjae Jeon wrote: > >>>> Second: Range validation and type validation should not be separated. > >>>> When I started making this patch,

RE: [PATCH v3] exfat: integrates dir-entry getting and validation

2020-08-25 Thread Namjae Jeon
> On 2020/08/26 10:03, Namjae Jeon wrote: > >> Second: Range validation and type validation should not be separated. > >> When I started making this patch, I intended to add only range validation. > >> However, after the caller gets the ep, the type validation fo

RE: [PATCH v3] exfat: integrates dir-entry getting and validation

2020-08-25 Thread Namjae Jeon
> Second: Range validation and type validation should not be separated. > When I started making this patch, I intended to add only range validation. > However, after the caller gets the ep, the type validation follows. > Get ep, null check of ep (= range verification), type verification is a >

RE: [PATCH v3] exfat: integrates dir-entry getting and validation

2020-08-21 Thread Namjae Jeon
> Thank you for your reply. > > >> @@ -171,7 +174,9 @@ struct exfat_entry_set_cache { > >>unsigned int start_off; > >>int num_bh; > >>struct buffer_head *bh[DIR_CACHE_SIZE]; > >> - unsigned int num_entries; > >> + int num_entries; > >> + struct exfat_de_file *de_file; > >> +

RE: [PATCH] exfat: use i_blocksize() to get blocksize

2020-08-17 Thread Namjae Jeon
> We alreday has the interface i_blocksize() to get blocksize, so use it. > > Signed-off-by: Xianting Tian Pushed it into exfat #dev. Thanks for your patch!

RE: [PATCH v3] exfat: remove EXFAT_SB_DIRTY flag

2020-08-12 Thread Namjae Jeon
> Thanks for thinking on this complicated issue. > > > > Most of the NAND flash devices and HDDs have wear leveling and bad sector > > replacement algorithms > applied. > > So I think that the life of the boot sector will not be exhausted first. > > I'm not too worried about the life of the

RE: [PATCH 1/2] exfat: add NameLength check when extracting name

2020-08-12 Thread Namjae Jeon
> Thank you for your reply. > > >> -static void exfat_get_uniname_from_ext_entry(struct super_block *sb, > >> - struct exfat_chain *p_dir, int entry, unsigned short *uniname) > >> +static int exfat_get_uniname_from_name_entries(struct > >> exfat_entry_set_cache *es, > >> +

[GIT PULL] exfat update for 5.9-rc1

2020-08-12 Thread Namjae Jeon
Hi Linus, This is exfat update pull request for v5.9-rc1. I add description of this pull request on below. Please pull exfat with following ones. Thanks! The following changes since commit bcf876870b95592b52519ed4aafcf9d95999bc9c: Linux 5.8 (2020-08-02 14:21:45 -0700) are available in the

RE: [PATCH 1/2] exfat: add dir-entry set checksum validation

2020-08-10 Thread Namjae Jeon
> Add checksum validation for dir-entry set when getting it. > exfat_calc_dir_chksum_with_entry_set() also validates entry-type. > > ** This patch depends on: > '[PATCH v3] exfat: integrates dir-entry getting and validation' > > Signed-off-by: Tetsuhiro Kohada > --- > fs/exfat/dir.c | 34

RE: [PATCH 1/2] exfat: add NameLength check when extracting name

2020-08-10 Thread Namjae Jeon
> The current implementation doesn't care NameLength when extracting the name > from Name dir-entries, so > the name may be incorrect. > (Without null-termination, Insufficient Name dir-entry, etc) Add a NameLength > check when extracting > the name from Name dir-entries to extract correct name.

RE: [PATCH v3] exfat: integrates dir-entry getting and validation

2020-08-10 Thread Namjae Jeon
> > +#define TYPE_PRIMARY (TYPE_CRITICAL_PRI | TYPE_BENIGN_PRI) > +#define TYPE_SECONDARY (TYPE_CRITICAL_SEC | TYPE_BENIGN_SEC) > + > #define MAX_CHARSET_SIZE 6 /* max size of multi-byte character */ > #define MAX_NAME_LENGTH 255 /* max len of file name

RE: [PATCH v2] exfat: integrates dir-entry getting and validation

2020-08-03 Thread Namjae Jeon
> Thank you for your reply. > > > > diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index > > > 573659bfbc55..09b85746e760 100644 > > > --- a/fs/exfat/dir.c > > > +++ b/fs/exfat/dir.c > > > @@ -33,6 +33,7 @@ static void exfat_get_uniname_from_ext_entry(struct > > > super_block *sb, { > > > int

Re: exfatprogs-1.0.4 version released

2020-08-01 Thread Namjae Jeon
2020-07-31 18:56 GMT+09:00, Sedat Dilek : > On Fri, Jul 31, 2020 at 9:16 AM Namjae Jeon > wrote: >> >> Hi folk, >> >> In this release, The performance of fsck have been much improved and >> the new option in mkfs have been added to adjust boundary alignment.

exfatprogs-1.0.4 version released

2020-07-31 Thread Namjae Jeon
Hi folk, In this release, The performance of fsck have been much improved and the new option in mkfs have been added to adjust boundary alignment. As the result below, The fsck performance is improved close to windows's fsck and much faster than the one in exfat-utils package. We measured the

RE: [PATCH] exfat: retain 'VolumeFlags' properly

2020-07-30 Thread Namjae Jeon
> Ping.. Hi Tetsuhiro, > > On 2020/07/15 19:06, Tetsuhiro Kohada wrote: > >> It looks complicated. It would be better to simply set/clear VOLUME DIRTY > >> bit. > > > > I think exfat_set_vol_flags() gets a little complicated, because it > > needs the followings (with bit operation) > > a)

RE: [PATCH v2] exfat: integrates dir-entry getting and validation

2020-07-30 Thread Namjae Jeon
> Add validation for num, bh and type on getting dir-entry. > ('file' and 'stream-ext' dir-entries are pre-validated to ensure success) > Renamed > exfat_get_dentry_cached() to exfat_get_validated_dentry() due to a change in > functionality. > > Integrate type-validation with simplified. > This

[GIT PULL] exfat fixes for 5.8-rc7

2020-07-21 Thread Namjae Jeon
. Hyeongseok Kim (1): exfat: fix wrong size update of stream entry by typo Ilya Ponetayev (1): exfat: fix name_hash computation on big endian systems Namjae Jeon (2): exfat: fix overflow issue in exfat_cluster_to_sector() exfat: fix wrong hint_stat

RE: [PATCH] exfat: retain 'VolumeFlags' properly

2020-07-14 Thread Namjae Jeon
> Thanks for your reply. > > > > Also, rename ERR_MEDIUM to MED_FAILURE. > > I think that MEDIA_FAILURE looks better. > > I think so too. > If so, should I change VOL_DIRTY to VOLUME_DIRTY? Yes, maybe. > > > > -int exfat_set_vol_flags(struct super_block *sb, unsigned short > > > new_flag) > > >

RE: [PATCH] exfat: retain 'VolumeFlags' properly

2020-07-12 Thread Namjae Jeon
Hi Tetsuhiro, > Retain ActiveFat, MediaFailure and ClearToZero fields. > And, never clear VolumeDirty, if it is dirty at mount. > > In '3.1.13.3 Media Failure Field' of exfat specification says ... > If, upon mounting a volume, the value of this field is 1, implementations > which scan the

RE: [PATCH] exfat: fix wrong size update of stream entry by typo

2020-07-09 Thread Namjae Jeon
> The stream.size field is updated to the value of create timestamp of the file > entry. Fix this to use > correct stream entry pointer. > > Fixes: 29bbb14bfc80 ("exfat: fix incorrect update of stream entry in > __exfat_truncate()") > Signed-off-by: Hyeongseok Kim My bad, Pushed it into exfat

Re: [PATCH] exfat: implement "quiet" option for setattr

2020-07-06 Thread Namjae Jeon
2020-07-06 17:22 GMT+09:00, Ju Hyung Park : > Hi Namjae. Hi Juhyung, > > Looks like I ported this incorrectly from the previous sdFAT base. > > I'll fix, test again and send v2. Okay:) Thanks! > > Thanks. > > On Thu, Jul 2, 2020 at 2:16 PM Namjae Jeon wrote: &g

RE: [PATCH v2] exfat: optimize exfat_zeroed_cluster()

2020-07-02 Thread Namjae Jeon
> > Replace part of exfat_zeroed_cluster() with exfat_update_bhs(). > > And remove exfat_sync_bhs(). > > > > Signed-off-by: Tetsuhiro Kohada > > Reviewed-by: Sungjong Seo > > Looks good. Thanks. Pushed it into exfat #dev. Thanks!

RE: [PATCH] exfat: implement "quiet" option for setattr

2020-07-01 Thread Namjae Jeon
> > if (((attr->ia_valid & ATTR_UID) && >!uid_eq(attr->ia_uid, sbi->options.fs_uid)) || @@ -322,6 +325,12 > @@ int > exfat_setattr(struct dentry *dentry, struct iattr *attr) > goto out; You should remove goto statement and curly braces here to reach if error

RE: [PATCH 5.7.y 0/5] exfat stable patches for 5.7.y

2020-07-01 Thread Namjae Jeon
> Hi Namjae, Hi Sasha, > > On Thu, Jul 02, 2020 at 08:20:19AM +0900, Namjae Jeon wrote: > >Could you please push exfat stable patches into 5.7.y kernel tree ? > > I've queued them up, however it would be much easier if for commits that > don't require any > modificati

[PATCH 5.7.y 2/5] exfat: add missing brelse() calls on error paths

2020-07-01 Thread Namjae Jeon
Signed-off-by: Dan Carpenter Signed-off-by: Namjae Jeon --- fs/exfat/namei.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index a2659a8a68a1..3bf1dbadab69 100644 --- a/fs/exfat/namei.c +++ b/fs/exfat/namei.c @@ -1089,10 +1

[PATCH 5.7.y 0/5] exfat stable patches for 5.7.y

2020-07-01 Thread Namjae Jeon
-only remount Namjae Jeon (1): exfat: move setting VOL_DIRTY over exfat_remove_entries() Sungjong Seo (1): exfat: flush dirty metadata in fsync fs/exfat/dir.c | 12 +++- fs/exfat/exfat_fs.h | 1 + fs/exfat/file.c | 19 ++- fs/exfat/namei.c| 14

[PATCH 5.7.y 5/5] exfat: flush dirty metadata in fsync

2020-07-01 Thread Namjae Jeon
and data pages for a file. Fixes: 98d917047e8b ("exfat: add file operations") Cc: sta...@vger.kernel.org # v5.7 Signed-off-by: Sungjong Seo Signed-off-by: Namjae Jeon --- fs/exfat/dir.c | 2 +- fs/exfat/exfat_fs.h | 1 + fs/exfat/file.c | 19 ++- 3 files c

[PATCH 5.7.y 4/5] exfat: move setting VOL_DIRTY over exfat_remove_entries()

2020-07-01 Thread Namjae Jeon
Move setting VOL_DIRTY over exfat_remove_entries() to avoid unneeded leaving VOL_DIRTY on -ENOTEMPTY. Fixes: 5f2aa075070c ("exfat: add inode operations") Cc: sta...@vger.kernel.org # v5.7 Reported-by: Tetsuhiro Kohada Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon --- fs/exf

[PATCH 5.7.y 1/5] exfat: Set the unused characters of FileName field to the value 0000h

2020-07-01 Thread Namjae Jeon
rg # v5.7 Signed-off-by: Hyeongseok.Kim Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon --- fs/exfat/dir.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index 4b91afb0f051..349ca0c282c2 100644 --- a/fs/exfat/dir.c +++ b/fs/ex

[PATCH 5.7.y 3/5] exfat: call sync_filesystem for read-only remount

2020-07-01 Thread Namjae Jeon
-only, exfat doesn't have a chance to commit metadata and vfs invalidates page caches in a block device. Fixes: 719c1e182916 ("exfat: add super block operations") Cc: sta...@vger.kernel.org # v5.7 Signed-off-by: Hyunchul Lee Acked-by: Sungjong Seo Signed-off-by: Namjae Jeon --- fs/exf

[GIT PULL] exfat fixes for 5.8-rc4

2020-06-29 Thread Namjae Jeon
of FileName field to the value h Hyunchul Lee (1): exfat: call sync_filesystem for read-only remount Namjae Jeon (1): exfat: move setting VOL_DIRTY over exfat_remove_entries() Sungjong Seo (1): exfat: flush dirty metadata in fsync fs/exfat/dir.c | 12 +++- fs/exfat

RE: [PATCH 1/2 v5] exfat: write multiple sectors at once

2020-06-23 Thread Namjae Jeon
> Write multiple sectors at once when updating dir-entries. > Add exfat_update_bhs() for that. It wait for write completion once instead of > sector by sector. > It's only effective if sync enabled. > > Signed-off-by: Tetsuhiro Kohada Pushed your 2 patches to exfat #dev. Thanks!

RE: [PATCH] exfat: flush dirty metadata in fsync

2020-06-21 Thread Namjae Jeon
> generic_file_fsync() exfat used could not guarantee the consistency of a file > because it has flushed > not dirty metadata but only dirty data pages for a file. > > Instead of that, use exfat_file_fsync() for files and directories so that it > guarantees to commit both > the metadata and

Re: [PATCH 1/2 v4] exfat: write multiple sectors at once

2020-06-20 Thread Namjae Jeon
2020-06-19 17:38 GMT+09:00, Tetsuhiro Kohada : > Write multiple sectors at once when updating dir-entries. > Add exfat_update_bhs() for that. It wait for write completion once > instead of sector by sector. > It's only effective if sync enabled. > > Reviewed-by: Christoph Hellwig He didn't give

RE: [PATCH v3] exfat: remove EXFAT_SB_DIRTY flag

2020-06-17 Thread Namjae Jeon
> > remove EXFAT_SB_DIRTY flag and related codes. > > > > This flag is set/reset in exfat_put_super()/exfat_sync_fs() to avoid > > sync_blockdev(). > > However ... > > - exfat_put_super(): > > Before calling this, the VFS has already called sync_filesystem(), so > > sync is never performed here. >

RE: [PATCH v2] exfat: call sync_filesystem for read-only remount

2020-06-17 Thread Namjae Jeon
> > We need to commit dirty metadata and pages to disk before remounting > > exfat as read-only. > > > > This fixes a failure in xfstests generic/452 > > > > generic/452 does the following: > > cp something / > > mount -o remount,ro > > > > the /something is corrupted. because while exfat is

RE: [PATCH v3] exfat: remove EXFAT_SB_DIRTY flag

2020-06-16 Thread Namjae Jeon
> remove EXFAT_SB_DIRTY flag and related codes. > > This flag is set/reset in exfat_put_super()/exfat_sync_fs() to avoid > sync_blockdev(). > However ... > - exfat_put_super(): > Before calling this, the VFS has already called sync_filesystem(), so sync is > never performed here. > -

RE: [PATCH 1/2] exfat: call sync_filesystem for read-only remount

2020-06-14 Thread Namjae Jeon
> Hi Namjae, > > 2020년 6월 15일 (월) 오전 9:14, Namjae Jeon 님이 작성: > > > > Hi Hyunchul, > > > We need to commit dirty metadata and pages to disk before remounting > > > exfat as read-only. > > > > > > This fixes a failure in xfstests gener

RE: [PATCH 2/2] exfat: allow to change some mount options for remount

2020-06-14 Thread Namjae Jeon
> Allow to change permission masks, allow_utime, errors. But ignore other > options. > > Signed-off-by: Hyunchul Lee > --- > fs/exfat/super.c | 40 +--- > 1 file changed, 29 insertions(+), 11 deletions(-) > > diff --git a/fs/exfat/super.c b/fs/exfat/super.c

RE: [PATCH 1/2] exfat: call sync_filesystem for read-only remount

2020-06-14 Thread Namjae Jeon
Hi Hyunchul, > We need to commit dirty metadata and pages to disk before remounting exfat as > read-only. > > This fixes a failure in xfstests generic/452 Could you please elaborate more the reason why generic/452 in xfstests failed ? > > Signed-off-by: Hyunchul Lee > --- > fs/exfat/super.c |

RE: [PATCH v2] exfat: add missing brelse() calls on error paths

2020-06-10 Thread Namjae Jeon
> If the second exfat_get_dentry() call fails then we need to release "old_bh" > before returning. There > is a similar bug in exfat_move_file(). > > Fixes: 5f2aa075070c ("exfat: add inode operations") > Reported-by: Markus Elfring > Signed-off-by: Dan Carpenter Applied. Thanks!

RE: [PATCH 1/2 v2] exfat: write multiple sectors at once

2020-06-09 Thread Namjae Jeon
> Write multiple sectors at once when updating dir-entries. > Add exfat_update_bhs() for that. It wait for write completion once instead of > sector by sector. > It's only effective if sync enabled. > > Suggested-by: Namjae Jeon > Signed-off-by: Tetsuhiro Kohada

[GIT PULL] exfat update for 5.8-rc1

2020-06-09 Thread Namjae Jeon
of EXFAT_DEFAULT_IOCHARSET config option Jason Yan (1): exfat: remove the assignment of 0 to bool variable Joe Perches (1): exfat: Use a more common logging style Namjae Jeon (2): exfat: remove unnecessary reassignment of p_uniname->name_len exfat: fix incorrect update of str

RE: [PATCH 3/3] exfat: set EXFAT_SB_DIRTY and VOL_DIRTY at the same timing

2020-06-08 Thread Namjae Jeon
> Thank you for your comment. > > > >> Can you split this patch into two? (Don't set VOL_DIRTY on > > >> -ENOTEMPTY and Setting EXFAT_SB_DIRTY is merged into > > >> exfat_set_vol_flag). I need to check the second one more. > > > > > > Can't do that. > > > > > > exfat_set_vol_flag() is called when

RE: [PATCH] exfat: Fix pontential use after free in exfat_load_upcase_table()

2020-06-08 Thread Namjae Jeon
> This code calls brelse(bh) and then dereferences "bh" on the next line > resulting in a possible use > after free. The brelse() should just be moved down a line. > > Fixes: b676fdbcf4c8 ("exfat: standardize checksum calculation") > Signed-off-by: Dan Carpenter Applied. Thanks! > --- >

Re: [PATCH 1/3] exfat: add error check when updating dir-entries

2020-06-06 Thread Namjae Jeon
2020-06-04 17:44 GMT+09:00, Tetsuhiro Kohada : Hi Tetsuhiro, > Add error check when synchronously updating dir-entries. > Furthermore, add exfat_update_bhs(). It wait for write completion once > instead of sector by sector. This patch can be split into two also ? > > Suggested-by: Sungjong Seo >

Re: [PATCH 3/3] exfat: set EXFAT_SB_DIRTY and VOL_DIRTY at the same timing

2020-06-06 Thread Namjae Jeon
2020-06-06 18:22 GMT+09:00, Tetsuhiro Kohada : > On 2020/06/05 16:32, Namjae Jeon wrote: >>> Set EXFAT_SB_DIRTY flag in exfat_put_super(). >>> >>> In some cases, can't clear VOL_DIRTY with 'sync'. >>> ex: >>> >>> VOL_DIRTY is set when rmd

RE: [PATCH 3/3] exfat: set EXFAT_SB_DIRTY and VOL_DIRTY at the same timing

2020-06-05 Thread Namjae Jeon
> Set EXFAT_SB_DIRTY flag in exfat_put_super(). > > In some cases, can't clear VOL_DIRTY with 'sync'. > ex: > > VOL_DIRTY is set when rmdir starts, but when non-empty-dir is detected, > return error without setting > EXFAT_SB_DIRTY. > If performe 'sync' in this state, VOL_DIRTY will not be

[PATCH] exfat: fix incorrect update of stream entry in __exfat_truncate()

2020-06-03 Thread Namjae Jeon
;) Cc: sta...@vger.kernel.org # v5.7 Signed-off-by: Namjae Jeon --- fs/exfat/file.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/exfat/file.c b/fs/exfat/file.c index 8e3f0eef45d7..fce03f318787 100644 --- a/fs/exfat/file.c +++ b/fs/exfat/file.c @@ -171,11 +171,11 @@ int __exfa

RE: [PATCH] exfat: fix memory leak in exfat_parse_param()

2020-06-02 Thread Namjae Jeon
> On Wed, Jun 03, 2020 at 10:29:57AM +0900, Namjae Jeon wrote: > > > exfat_free() should call exfat_free_iocharset() after stealing > > param->string instead of kstrdup in exfat_parse_param(). > > ITYM > extfat_free() should call exfat_free_iocharset(), to pre

[PATCH v2] exfat: fix memory leak in exfat_parse_param()

2020-06-02 Thread Namjae Jeon
From: Al Viro butt3rflyh4ck reported memory leak found by syzkaller. A param->string held by exfat_mount_options. BUG: memory leak unreferenced object 0x88801972e090 (size 8): comm "syz-executor.2", pid 16298, jiffies 4295172466 (age 14.060s) hex dump (first 8 bytes): 6b 6f 69 38

[PATCH] exfat: fix memory leak in exfat_parse_param()

2020-06-02 Thread Namjae Jeon
From: Al Viro butt3rflyh4ck reported memory leak found by syzkaller. A param->string held by exfat_mount_options. BUG: memory leak unreferenced object 0x88801972e090 (size 8): comm "syz-executor.2", pid 16298, jiffies 4295172466 (age 14.060s) hex dump (first 8 bytes): 6b 6f 69 38

RE: memory leak in exfat_parse_param

2020-06-02 Thread Namjae Jeon
> On Tue, Jun 02, 2020 at 01:03:05PM +0800, butt3rflyh4ck wrote: > > I report a bug (in linux-5.7.0-rc7) found by syzkaller. > > > > kernel config: > > https://protect2.fireeye.com/url?k=f3a88a7d-ae6446d8-f3a90132-0cc47a30 > > d446-6021a2fbdd1681a8=1=https%3A%2F%2Fgithub.com%2Fbutterflyhack%2 > >

RE: [PATCH] exfat: optimize dir-cache

2020-06-02 Thread Namjae Jeon
> > Optimize directory access based on exfat_entry_set_cache. > > - Hold bh instead of copied d-entry. > > - Modify bh->data directly instead of the copied d-entry. > > - Write back the retained bh instead of rescanning the d-entry-set. > > And > > - Remove unused cache related definitions. >

  1   2   3   4   5   6   7   8   9   10   >