Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1116409ybc; Tue, 12 Nov 2019 14:40:38 -0800 (PST) X-Google-Smtp-Source: APXvYqymnVdDlKPHCTOnld0HOOqwWWQFYydog/jfQ0CyWYjdwq8k1eTa1/0ZSMF2iLMbi6HKeSyz X-Received: by 2002:aa7:d3da:: with SMTP id o26mr140737edr.302.1573598438706; Tue, 12 Nov 2019 14:40:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573598438; cv=none; d=google.com; s=arc-20160816; b=wqlSib9TaSj0K1wtwT5Vm/RzU2oX3tUjfczr9PshIRsUdLGZ5vJWtvq07bo4vNDEBc j6rnVxxS6R3e5UYqYOpsZCn2Zwv6wdPUtXYDyCROow+RS6pkkTk+PFqaua3derDtTm+W t/z+c1oayUHkl7FrxGibOdv+92CST1vf3QII5FkfXwMMgtc2wM1TMN6yx46xBL4f4/SN h5qa3gL0gOQSX0LejBQAz3iE8OwNmICU4Rkec6A/Pj9+OBd3VFYCV2TT7CrKPf+kUI9H NqmPGeX5cI9PazhS0uctPkEq2EXOZBFlVc84pn1Va2B3tzzBqeBJsVs5AEGKGC8lWCBj 7DXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=b3SMezw3KJOVVm/niCddVCl0DjKIk3OgqaEONN074B8=; b=Qq2reXBWMIibxAeIFXRDwxeh79NQ0Y1N4LP+e3IgDv4nl4mkfEMMHL1JHhtpqGPYcI PruYSx4Sbk9Fi8p2xBrxCZ7GvL/pyYlnNQpXcjqrhrG5MxI/Qc12PkzyjfNQ4ZoLwLgH AkFl6hLUbW9ZFEA/UordA5BwsVsBp6gl3uMy6AQoK7/S7BAFzBIsMysCXADkESGFqV6M ghM76Bl+87ETB5WcZAhyKNQ5paAdGUn+TE/mrnSsp1v0JE84IJ57izq85xXekZlizgo+ FxA1jSDcyqY52tuN9MkUtOhgkb2oHApXEw8GEpuzNGBt2n0HEm03LZrzyrPH/BO0bdcB N9bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vt.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b28si16541153edc.400.2019.11.12.14.40.14; Tue, 12 Nov 2019 14:40:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vt.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727140AbfKLWgh (ORCPT + 99 others); Tue, 12 Nov 2019 17:36:37 -0500 Received: from outbound.smtp.vt.edu ([198.82.183.121]:33140 "EHLO omr2.cc.vt.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726932AbfKLWgh (ORCPT ); Tue, 12 Nov 2019 17:36:37 -0500 Received: from mr6.cc.vt.edu (mr6.cc.ipv6.vt.edu [IPv6:2607:b400:92:8500:0:af:2d00:4488]) by omr2.cc.vt.edu (8.14.4/8.14.4) with ESMTP id xACMaWHn030543 for ; Tue, 12 Nov 2019 17:36:32 -0500 Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mr6.cc.vt.edu (8.14.7/8.14.7) with ESMTP id xACMaRvU011474 for ; Tue, 12 Nov 2019 17:36:32 -0500 Received: by mail-qk1-f200.google.com with SMTP id 125so189664qkj.12 for ; Tue, 12 Nov 2019 14:36:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=b3SMezw3KJOVVm/niCddVCl0DjKIk3OgqaEONN074B8=; b=sjkufI9UewLuZBZ7HNhgNXMGxa4dWEhalqssG+jEEsgPDwCOVaqv50QbHM21OwzKHl UvYWXc8cWYr/vWvJAQ0pGYQXXWNd0ibMdbV6fpJz0P6TvFfZtmgaLJngVDWjwfuq98I/ +yg+1pCqNLQZVZgy+o7DEarf6EYIsxsw8iVKmZ3JVmPFji9DopCXhao0e/a/K/soH3kZ hPlwNuCPlBoVSv/IwOJXnHyXYgPzUSH158Kje0gFSTRno6pDQc+WHE/r316aCPJfu96k q7ebc2OsG8rK01LP9E9Fjx/bAPUEA6EZvg4w+1PALI8Dqc8n2a3MGTBNGuJa0ae7NWHl KdIA== X-Gm-Message-State: APjAAAVxLxJmDWowlJgOwdvelIEwvw6sKJIdJqsD4gmDrDgt0pSlL4XO VR1LI62UZkg0I/MbaMY/Etxwqmk19yeH/zagIenTJmEPyK9ujf01WnAFll8sXERhJdGk4C0fhwk RHtcQSEYiVZosH4mKTOF0gPakfcMfP/U2t3E= X-Received: by 2002:aed:2821:: with SMTP id r30mr34335461qtd.367.1573598186911; Tue, 12 Nov 2019 14:36:26 -0800 (PST) X-Received: by 2002:aed:2821:: with SMTP id r30mr34335437qtd.367.1573598186582; Tue, 12 Nov 2019 14:36:26 -0800 (PST) Received: from turing-police.lan ([2601:5c0:c001:c9e1::359]) by smtp.gmail.com with ESMTPSA id l132sm41647qke.38.2019.11.12.14.36.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 14:36:25 -0800 (PST) From: Valdis Kletnieks X-Google-Original-From: Valdis Kletnieks To: Greg Kroah-Hartman Cc: Valdis Kletnieks , Valdis Kletnieks , linux-fsdevel@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: exfat: Update the TODO file Date: Tue, 12 Nov 2019 17:36:08 -0500 Message-Id: <20191112223609.163501-1-Valdis.Kletnieks@vt.edu> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Updating with the current laundry list of things that need attention. Signed-off-by: Valdis Kletnieks --- drivers/staging/exfat/TODO | 70 ++++++++++++++++++++++++++++++++------ 1 file changed, 59 insertions(+), 11 deletions(-) diff --git a/drivers/staging/exfat/TODO b/drivers/staging/exfat/TODO index b60e50b9cf4e..a283ce534cf4 100644 --- a/drivers/staging/exfat/TODO +++ b/drivers/staging/exfat/TODO @@ -1,17 +1,22 @@ +A laundry list of things that need looking at, most of which will +require more work than the average checkpatch cleanup... + +Note that some of these entries may not be bugs - they're things +that need to be looked at, and *possibly* fixed. + +Clean up the ffsCamelCase function names. + +Fix (thing)->flags to not use magic numbers - multiple offenders + +Sort out all the s32/u32/u8 nonsense - most of these should be plain int. + exfat_core.c - ffsReadFile - the goto err_out seem to leak a brelse(). same for ffsWriteFile. -exfat_core.c - fs_sync(sb,0) all over the place looks fishy as hell. -There's only one place that calls it with a non-zero argument. -Randomly removing fs_sync() calls is *not* the right answer, especially -if the removal then leaves a call to fs_set_vol_flags(VOL_CLEAN), as that -says the file system is clean and synced when we *know* it isn't. -The proper fix here is to go through and actually analyze how DELAYED_SYNC -should work, and any time we're setting VOL_CLEAN, ensure the file system -has in fact been synced to disk. In other words, changing the 'false' to -'true' is probably more correct. Also, it's likely that the one current -place where it actually does an bdev_sync isn't sufficient in the DELAYED_SYNC -case. +All the calls to fs_sync() need to be looked at, particularly in the +context of EXFAT_DELAYED_SYNC. Currently, if that's defined, we only +flush to disk when sync() gets called. We should be doing at least +metadata flushes at appropriate times. ffsTruncateFile - if (old_size <= new_size) { That doesn't look right. How did it ever work? Are they relying on lazy @@ -19,3 +24,46 @@ block allocation when actual writes happen? If nothing else, it never does the 'fid->size = new_size' and do the inode update.... ffsSetAttr() is just dangling in the breeze, not wired up at all... + +Convert global mutexes to a per-superblock mutex. + +Right now, we load exactly one UTF-8 table. Check to see +if that plays nice with different codepage and iocharset values +for simultanous mounts of different devices + +exfat_rmdir() checks for -EBUSY but ffsRemoveDir() doesn't return it. +In fact, there's a complete lack of -EBUSY testing anywhere. + +There's probably a few missing checks for -EEXIST + +check return codes of sync_dirty_buffer() + +Why is remove_file doing a num_entries++?? + +Double check a lot of can't-happen parameter checks (for null pointers for +things that have only one call site and can't pass a null, etc). + +All the DEBUG stuff can probably be tossed, including the ioctl(). Either +that, or convert to a proper fault-injection system. + +exfat_remount does exactly one thing. Fix to actually deal with remount +options, particularly handling R/O correctly. For that matter, allow +R/O mounts in the first place. + +Figure out why the VFAT code used multi_sector_(read|write) but the +exfat code doesn't use it. The difference matters on SSDs with wear leveling. + +exfat_fat_sync(), exfat_buf_sync(), and sync_alloc_bitmap() +aren't called anyplace.... + +Create helper function for exfat_set_entry_time() and exfat_set_entry_type() +because it's sort of ugly to be calling the same functionn directly and +other code calling through the fs_func struc ponters... + +clean up the remaining vol_type checks, which are of two types: +some are ?: operators with magic numbers, and the rest are places +where we're doing stuff with '.' and '..'. + +Patches to: + Greg Kroah-Hartman + Valdis Kletnieks -- 2.24.0