Re: A question on the function clean_bdev_bh_alias
Really appreciate your help. Thanks Larry -- Original -- From: "valdis.kletnieks"; Date: Sat, Aug 11, 2018 00:00 AM To: "Larry"; Cc: "kernelnewbies"; Subject: Re: A question on the function clean_bdev_bh_alias On Fri, 10 Aug 2018 22:48:43 +0800, "Larry" said: > Does it intend to remove existent pages in block device's page cache > if some new page cache of a vfs file was created whose block number > range has overlaps with its block device page cache? That's a situation you *really* hope doesn't arise. Consider if you have (for example) an ext4 filesystem on /dev/sda4 mounted on /foobar. For there to be page cache for the ext4 filesystem and also page cache for the block device, that means that something is writing to a file on /foobar while something else is writing directly to /dev/sda4. That's a really good way to corrupt the filesystem (and is why it's a Really Bad Idea to fsck a mounted filesystem). And no, merely trimming cache pages that overlap doesn't even come *close* to fixing the problem...___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: A question on the function clean_bdev_bh_alias
On Fri, 10 Aug 2018 22:48:43 +0800, "Larry" said: > Does it intend to remove existent pages in block device's page cache > if some new page cache of a vfs file was created whose block number > range has overlaps with its block device page cache? That's a situation you *really* hope doesn't arise. Consider if you have (for example) an ext4 filesystem on /dev/sda4 mounted on /foobar. For there to be page cache for the ext4 filesystem and also page cache for the block device, that means that something is writing to a file on /foobar while something else is writing directly to /dev/sda4. That's a really good way to corrupt the filesystem (and is why it's a Really Bad Idea to fsck a mounted filesystem). And no, merely trimming cache pages that overlap doesn't even come *close* to fixing the problem... pgp8RJnm3pU8F.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
A question on the function clean_bdev_bh_alias
Hello list, I'm confused with the function, could someone help?? Does it intend to remove existent pages in block device's page cache if some new page cache of a vfs file was created whose block number range has overlaps with its block device page cache? Thanks in advance. Best regards, Larry___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies