From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753164AbbCPNZo (ORCPT ); Mon, 16 Mar 2015 09:25:44 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:11859 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750948AbbCPNZl (ORCPT ); Mon, 16 Mar 2015 09:25:41 -0400 X-AuditID: cbfec7f5-b7fc86d0000066b7-49-5506d93c36d3 From: Beata Michalska To: lczerner@redhat.com, adilger.kernel@dilger.ca Cc: tytso@mit.edu, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, kyungmin.park@samsung.com Subject: [PATCH v2 0/2] ext4: Add pollable sysfs entry for block threshold events Date: Mon, 16 Mar 2015 14:25:27 +0100 Message-id: <1426512329-24299-1-git-send-email-b.michalska@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCJMWRmVeSWpSXmKPExsVy+t/xy7o2N9lCDU4vM7T4+qWDxeJs0xt2 i2UPNrNYzJx3h83i8q45bBatPT/ZHdg8WjaXezSdOcrs8X7fVTaPvi2rGD0+b5ILYI3isklJ zcksSy3St0vgyji3srBgOW/Fk+f6DYxNXF2MnBwSAiYS56dfZ4KwxSQu3FvP1sXIxSEksJRR YuKdbrCEkEAvk8Sb2ywgNpuAvsSrGSvB4iIChhJTb9xhBLGZBTIkrvVdBosLCwRLbOk4DhZn EVCVOLT8GVgvr4C7xJO9Z4DiHEDLFCTmTLKZwMi9gJFhFaNoamlyQXFSeq6RXnFibnFpXrpe cn7uJkZISHzdwbj0mNUhRgEORiUe3gh5tlAh1sSy4srcQ4wSHMxKIryfTgKFeFMSK6tSi/Lj i0pzUosPMTJxcEo1MG6duHuuvuQd6ZyK8LB0i6jKigbdSR6OdtUPOrbnuO5PPbVHIS5m7t60 ax4/OAwvTtq76HlQ9LNpO8WeRP5XnXD+cB+HqoZpnIGDpbVlkqrBjvm5SfOaV3n+PjmbtWT2 VrEKB+Om5XuU0gXqThqyWbyoyFm9INSDKaZE0e5z1crJS7Oq0j0dlViKMxINtZiLihMBEy+z ZucBAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There has been a request to provide a notification whenever the amount of free space drops below a certain level. This level, preferably, could be adjusted based on the actual space usage, so that appropraite actions can be undertaken for different levels being reached. The idea here is to expose a pollabe sysfs entry through which the threshold can be spcified, in a form of a number of used logical blocks. Then, the process might wait for a notification, through the very same sysfs entry, instead of periodically calling statfs - as the concept introduced, is to resemble the very last with hopefully, minimum overhead. When the process wakes-up it might decide to increase the threshold and once again wait for the notification. --- v2: - rename the helper function to ext4_mark_group_corrupted and move the changes to a separate patch - move the call to notify function from ext4_mb_new_blocks and ext4_da_reserve_space to ext4_has_free_clusters, remove it from ext4_update_super - switch from used to available blocks - add documnetation for new sysfs entry --- Beata Michalska (2): ext4: Add helper function to mark group as corrupted ext4: Add pollable sysfs entry for block threshold events Documentation/filesystems/ext4.txt | 11 +++++++ fs/ext4/balloc.c | 45 +++++++++++--------------- fs/ext4/ext4.h | 14 +++++++++ fs/ext4/ialloc.c | 5 +-- fs/ext4/mballoc.c | 13 ++------ fs/ext4/super.c | 61 ++++++++++++++++++++++++++++++++++-- 6 files changed, 106 insertions(+), 43 deletions(-) -- 1.7.9.5