From andre@ignavus.net Fri Mar 06 01:38:33 2020 Received: from mail-il1-f175.google.com ([209.85.166.175]) by stoneboat.default.lvansomeren.uk0.bigv.io with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1jA1wT-0002qn-Im for yaffs@stoneboat.aleph1.co.uk; Fri, 06 Mar 2020 01:38:32 +0000 Received: by mail-il1-f175.google.com with SMTP id a6so596363ilc.4 for ; Thu, 05 Mar 2020 17:38:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ignavus-net.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=Y6bJz2oEtG3wNgTP33Nt7qy1Do1zGtcAaLmws4JPNxs=; b=ZnztwWrDp+0CXgz8EerVhtKgjPjlR2bTzNJi5IfPhmT4Dq2+vMjBVmQ/wUZRsJvUML PfOUZuJwcAeBjlVwLM4dwuR+PdqBbPEJ/leAxppIC/8yT/UHwjk+WNbeVk6+H4Jv7gcw WiTY4BF8U0H+LsNuySBSVUZFTREEowV3xgTrLd+eY+Xgnw+lsBJxYQHepHJDAqW+u+ZW dKYsByoS/yTMxi/hEtF0FdMFHRk91GjAtAaWL6XUILPQOul6ST9PGWRvFQeKalgyB/Hf IdUL8lJXuVFaGJ+ISSsuzG3cZtkjxisKQOVkSZwFCNesWUpCoP9hm+YxJQOORtNQb5GK SZCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Y6bJz2oEtG3wNgTP33Nt7qy1Do1zGtcAaLmws4JPNxs=; b=XTzvKCRJbWyunhVcdZRxIk/NCK5GbovychZTtEkTH1fE91fivxdPyUg7gat5zgzD75 6ekRxif6tyo9JXAtcSRZu0nvfkl01dRRPMqToRbfArJR11EkIiRchh9IEBcihpEdqlHf KV0enNuGxW7xP5SlniFfZ6LTUkFTNBmTnYAfP0BzRiCFT01UWjXww09ZXnEpWmGiByfE QkNYIFP0VtXwUSjTWvTfgpBNdHIGKqAVp4E5dxe/S0GjYnSNxfuAlW9gQ+OP1+fSq48a UF/1FOwPFJJYhswN+UD4Ob0poSU6uhD7enGUwI6QPapV9wX00lS2nqo+2ViQSDuQTNae VKSQ== X-Gm-Message-State: ANhLgQ3o30eSDkU+bV27+WEBH62n6BomR/MzY3+C6be5t2qAKrWwf7t8 kCJNiCP5yNfr59/2o2gsK0EiXOo+1yT+u5mwSFD/BsSAiMqOug== X-Google-Smtp-Source: ADFU+vtoumullbuGlPeg11N+I8wXYOhdvTgxtmmsHlkkHKo75HAKm+VYP5pIuz9vmjuaBuYL6PEMDn7nSARxmd9XS/g= X-Received: by 2002:a92:6f10:: with SMTP id k16mr925797ilc.275.1583458699542; Thu, 05 Mar 2020 17:38:19 -0800 (PST) MIME-Version: 1.0 From: Andre Renaud Date: Fri, 6 Mar 2020 14:38:08 +1300 Message-ID: To: yaffs Content-Type: text/plain; charset="UTF-8" X-Spam_score: -2.8 X-Spam_score_int: -27 X-Spam_bar: -- X-Spam_report: Spam detection software, running on the system "stoneboat.default.lvansomeren.uk0.bigv.io", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, I'm re-investigating an old issue that we're still seeing, earlier discussed here: http://stoneboat.aleph1.co.uk/lurker/message/20161109.011210.e8aaca1b.gl.html and I think it's the same issue dis [...] Content analysis details: (-2.8 points, 4.9 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.175 listed in list.dnswl.org] -1.5 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.175 listed in wl.mailspike.net] 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: aleph1.co.uk] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.6 AWL AWL: Adjusted score from AWL reputation of From: address X-ACL-Warn: warn X-SA-Exim-Connect-IP: 209.85.166.175 X-SA-Exim-Mail-From: andre@ignavus.net X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on stoneboat.default.lvansomeren.uk0.bigv.io X-Spam-Level: X-Spam-Status: No, score=-2.8 required=4.9 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on stoneboat.default.lvansomeren.uk0.bigv.io) X-Mailman-Approved-At: Fri, 06 Mar 2020 09:10:22 +0000 Subject: [Yaffs] yaffs_iterate + readdir + unlink X-BeenThere: yaffs@stoneboat.aleph1.co.uk X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion of YAFFS NAND flash filesystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 01:38:33 -0000 Hi, I'm re-investigating an old issue that we're still seeing, earlier discussed here: http://stoneboat.aleph1.co.uk/lurker/message/20161109.011210.e8aaca1b.gl.html and I think it's the same issue discussed here: http://stoneboat.aleph1.co.uk/lurker/message/20170313.063024.e8a1ade9.es.html This is causing the bonnie++ tool to fail on Yaffs. I've traced it down to an issue when combining the yaffs_iterate callback with unlink. yaffs_iterate can be called with a start offset, and all the files up to that point are skipped. However Bonnie++ uses readdir +unlink, so it iterates over all items in the directory, unlinking them. It does this in chunks, and each time it moves onto a new chunk, it uses the offset at the end of the last chunk. But under the hood YAFFS has been told to delete files from the directory, and as such the offsets are now incorrect. I think that inside yaffs_remove_obj_callback we should be checking if the removed object has already been emitted by an in-progress search, in which case we need to decrement the search position. Any thoughts on this? Regards, Andre